Skip to content

Commit

Permalink
don't modify $/
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
akr committed Sep 7, 2004
1 parent 1ae2ac9 commit 23a4871
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions test/zlib/test_zlib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,12 @@ def test_ungetc_paragraph # [ruby-dev:24065]
w << "abc"
w.close
r = Zlib::GzipReader.new(StringIO.new(s))
begin
old_rs = $/
$/ = ""
r.ungetc ?\n
assert_equal("abc", r.gets)
assert_nothing_raised {
r.read
r.close
}
ensure
$/ = old_rs
end
r.ungetc ?\n
assert_equal("abc", r.gets(""))
assert_nothing_raised {
r.read
r.close
}
end
end

Expand Down

0 comments on commit 23a4871

Please sign in to comment.