summaryrefslogtreecommitdiff
path: root/spec/ruby/library/English
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-01-20 17:53:46 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-23 13:37:40 +0900
commit6298ec2875a6f1a1e75698c96ceac94362f20bcf (patch)
tree70143b5c6d6df6dfdc7a0ea2707a050fbdc59131 /spec/ruby/library/English
parent588a86e32c9e646823e1436e53ffe1c37206abd3 (diff)
Warn non-nil `$\` [Feature #14240]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2920
Diffstat (limited to 'spec/ruby/library/English')
-rw-r--r--spec/ruby/library/English/English_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/library/English/English_spec.rb b/spec/ruby/library/English/English_spec.rb
index f6153ec7c9..480602d5e5 100644
--- a/spec/ruby/library/English/English_spec.rb
+++ b/spec/ruby/library/English/English_spec.rb
@@ -67,18 +67,18 @@ describe "English" do
it "aliases $ORS to $\\" do
original = $\
- $\ = "\t"
+ suppress_warning {$\ = "\t"}
$ORS.should_not be_nil
$ORS.should == $\
- $\ = original
+ suppress_warning {$\ = original}
end
it "aliases $OUTPUT_RECORD_SEPARATOR to $\\" do
original = $\
- $\ = "\t"
+ suppress_warning {$\ = "\t"}
$OUTPUT_RECORD_SEPARATOR.should_not be_nil
$OUTPUT_RECORD_SEPARATOR.should == $\
- $\ = original
+ suppress_warning {$\ = original}
end
it "aliases $INPUT_LINE_NUMBER to $." do