mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Update test_string.rb
This commit is contained in:
parent
5e324ac11c
commit
09d6cfc55c
1 changed files with 6 additions and 0 deletions
|
@ -2842,6 +2842,9 @@ CODE
|
||||||
assert_nil(S("foo").casecmp(:foo))
|
assert_nil(S("foo").casecmp(:foo))
|
||||||
assert_nil(S("foo").casecmp(Object.new))
|
assert_nil(S("foo").casecmp(Object.new))
|
||||||
|
|
||||||
|
assert_nil(S("foo").casecmp(0))
|
||||||
|
assert_nil(S("foo").casecmp(5.00))
|
||||||
|
|
||||||
o = Object.new
|
o = Object.new
|
||||||
def o.to_str; "fOO"; end
|
def o.to_str; "fOO"; end
|
||||||
assert_equal(0, S("FoO").casecmp(o))
|
assert_equal(0, S("FoO").casecmp(o))
|
||||||
|
@ -2867,6 +2870,9 @@ CODE
|
||||||
assert_nil(S("foo").casecmp?(:foo))
|
assert_nil(S("foo").casecmp?(:foo))
|
||||||
assert_nil(S("foo").casecmp?(Object.new))
|
assert_nil(S("foo").casecmp?(Object.new))
|
||||||
|
|
||||||
|
assert_nil(S("foo").casecmp(0))
|
||||||
|
assert_nil(S("foo").casecmp(5.00))
|
||||||
|
|
||||||
o = Object.new
|
o = Object.new
|
||||||
def o.to_str; "fOO"; end
|
def o.to_str; "fOO"; end
|
||||||
assert_equal(true, S("FoO").casecmp?(o))
|
assert_equal(true, S("FoO").casecmp?(o))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue