diff options
Diffstat (limited to 'spec/ruby/library/stringio/readline_spec.rb')
-rw-r--r-- | spec/ruby/library/stringio/readline_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/ruby/library/stringio/readline_spec.rb b/spec/ruby/library/stringio/readline_spec.rb index 9af633472e..94b67bc92d 100644 --- a/spec/ruby/library/stringio/readline_spec.rb +++ b/spec/ruby/library/stringio/readline_spec.rb @@ -64,12 +64,13 @@ describe "StringIO#readline when passed no argument" do @io.readline.should == "this is\n" begin - old_sep, $/ = $/, " " + old_sep = $/ + suppress_warning {$/ = " "} @io.readline.should == "an " @io.readline.should == "example\nfor " @io.readline.should == "StringIO#readline" ensure - $/ = old_sep + suppress_warning {$/ = old_sep} end end |