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.

1
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
Replies