diff options
Diffstat (limited to 'spec/ruby/core/kernel/match_spec.rb')
-rw-r--r-- | spec/ruby/core/kernel/match_spec.rb | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/spec/ruby/core/kernel/match_spec.rb b/spec/ruby/core/kernel/match_spec.rb index bc6cb3d9dd..d5808b6ede 100644 --- a/spec/ruby/core/kernel/match_spec.rb +++ b/spec/ruby/core/kernel/match_spec.rb @@ -1,22 +1,16 @@ require_relative '../../spec_helper' describe "Kernel#=~" do - verbose = $VERBOSE - before :each do - verbose, $VERBOSE = $VERBOSE, nil - end - after :each do - $VERBOSE = verbose - end - it "returns nil matching any object" do o = Object.new - (o =~ /Object/).should be_nil - (o =~ 'Object').should be_nil - (o =~ Object).should be_nil - (o =~ Object.new).should be_nil - (o =~ nil).should be_nil - (o =~ true).should be_nil + suppress_warning do + (o =~ /Object/).should be_nil + (o =~ 'Object').should be_nil + (o =~ Object).should be_nil + (o =~ Object.new).should be_nil + (o =~ nil).should be_nil + (o =~ true).should be_nil + end end end |