diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-09-17 11:42:26 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-09-17 11:42:26 +0200 |
commit | 3f6c0a6d74209b03d0ec54b98b5e1ece40d649f0 (patch) | |
tree | 15810b34167d6e88c5d24a7968a97deb5120a91d /spec/ruby/core/nil | |
parent | ce888bfa231bec52dfd3c1e9562f6ce799d8a389 (diff) | |
download | ruby-3f6c0a6d74209b03d0ec54b98b5e1ece40d649f0.tar.gz |
Update to ruby/spec@e829fb0
Diffstat (limited to 'spec/ruby/core/nil')
-rw-r--r-- | spec/ruby/core/nil/case_compare_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/ruby/core/nil/case_compare_spec.rb b/spec/ruby/core/nil/case_compare_spec.rb new file mode 100644 index 0000000000..142560c6f5 --- /dev/null +++ b/spec/ruby/core/nil/case_compare_spec.rb @@ -0,0 +1,13 @@ +require_relative '../../spec_helper' + +describe "NilClass#===" do + it "returns true for nil" do + (nil === nil).should == true + end + + it "returns false for non-nil object" do + (nil === 1).should == false + (nil === "").should == false + (nil === Object).should == false + end +end |