aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/library/stringio/readlines_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/stringio/readlines_spec.rb')
-rw-r--r--spec/ruby/library/stringio/readlines_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/ruby/library/stringio/readlines_spec.rb b/spec/ruby/library/stringio/readlines_spec.rb
index 7f9f9f5846..4b007787e2 100644
--- a/spec/ruby/library/stringio/readlines_spec.rb
+++ b/spec/ruby/library/stringio/readlines_spec.rb
@@ -51,10 +51,11 @@ describe "StringIO#readlines when passed no argument" do
it "returns an Array containing lines based on $/" do
begin
- old_sep, $/ = $/, " "
+ old_sep = $/;
+ suppress_warning {$/ = " "}
@io.readlines.should == ["this ", "is\nan ", "example\nfor ", "StringIO#readlines"]
ensure
- $/ = old_sep
+ suppress_warning {$/ = old_sep}
end
end