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