diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-20 20:38:57 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-20 20:38:57 +0000 |
commit | 6204e0804b24f1675b49d5880da014411bcfb831 (patch) | |
tree | ce6c00bf078fc416936ca3cdc972b9b3c1c78dae /spec/ruby/core/nil | |
parent | 58573c33e4720315ed27491e31dcc22892e1ce95 (diff) | |
download | ruby-6204e0804b24f1675b49d5880da014411bcfb831.tar.gz |
Update to ruby/spec@35a9fba
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/nil')
-rw-r--r-- | spec/ruby/core/nil/match_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/ruby/core/nil/match_spec.rb b/spec/ruby/core/nil/match_spec.rb new file mode 100644 index 0000000000..3f69312bfe --- /dev/null +++ b/spec/ruby/core/nil/match_spec.rb @@ -0,0 +1,19 @@ +require_relative '../../spec_helper' + +ruby_version_is "2.6" do + describe "NilClass#=~" do + it "returns nil matching any object" do + o = Object.new + + 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 =~ false).should be_nil + (o =~ true).should be_nil + end + end + end +end |