summaryrefslogtreecommitdiff
path: root/spec/ruby/core/io/puts_spec.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-01-21 08:37:44 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-23 13:37:40 +0900
commit8a7e0aaaef3b19f90d6debe6781e4b3031f56237 (patch)
treee4c6fb0dd79b1d856cd8a200f550170114bbf30a /spec/ruby/core/io/puts_spec.rb
parent6298ec2875a6f1a1e75698c96ceac94362f20bcf (diff)
Warn non-nil `$/` [Feature #14240]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2920
Diffstat (limited to 'spec/ruby/core/io/puts_spec.rb')
-rw-r--r--spec/ruby/core/io/puts_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/io/puts_spec.rb b/spec/ruby/core/io/puts_spec.rb
index 3e4b877b7f..be220c4035 100644
--- a/spec/ruby/core/io/puts_spec.rb
+++ b/spec/ruby/core/io/puts_spec.rb
@@ -16,7 +16,7 @@ describe "IO#puts" do
ScratchPad.clear
@io.close if @io
rm_r @name
- $/ = @before_separator
+ suppress_warning {$/ = @before_separator}
end
it "writes just a newline when given no args" do
@@ -105,7 +105,7 @@ describe "IO#puts" do
end
it "ignores the $/ separator global" do
- $/ = ":"
+ suppress_warning {$/ = ":"}
@io.puts(5).should == nil
ScratchPad.recorded.should == "5\n"
end