Dave Copeland :ruby:
- 7mo ·
-
Public·
-
ruby.social
#TIL about Ruby:
String === String # => false
Meaning:
x = String
result = case x
when String then "got a string"
else “not a string"
end
result # => not a string
I guess I figured === would always be true for equality, but I guess not?
Of note, "foo" === "foo” # => true
Weird.