diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-01-20 17:53:46 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-02-23 13:37:40 +0900 |
commit | 6298ec2875a6f1a1e75698c96ceac94362f20bcf (patch) | |
tree | 70143b5c6d6df6dfdc7a0ea2707a050fbdc59131 /spec/ruby/core/kernel | |
parent | 588a86e32c9e646823e1436e53ffe1c37206abd3 (diff) | |
download | ruby-6298ec2875a6f1a1e75698c96ceac94362f20bcf.tar.gz |
Warn non-nil `$\` [Feature #14240]
Diffstat (limited to 'spec/ruby/core/kernel')
-rw-r--r-- | spec/ruby/core/kernel/p_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/ruby/core/kernel/p_spec.rb b/spec/ruby/core/kernel/p_spec.rb index 798bd47b34..1bdd1740ca 100644 --- a/spec/ruby/core/kernel/p_spec.rb +++ b/spec/ruby/core/kernel/p_spec.rb @@ -57,10 +57,14 @@ describe "Kernel#p" do } -> { p(o) }.should output_to_fd("Next time, Gadget, NEXT TIME!\n") - $\ = " *helicopter sound*\n" + suppress_warning { + $\ = " *helicopter sound*\n" + } -> { p(o) }.should output_to_fd("Next time, Gadget, NEXT TIME!\n") - $/ = " *helicopter sound*\n" + suppress_warning { + $/ = " *helicopter sound*\n" + } -> { p(o) }.should output_to_fd("Next time, Gadget, NEXT TIME!\n") end |