Be careful of accidentally using strict equality with === like so:
String==='s'.class
That works with == but will fail with ===.
=== is all types of fun in Ruby, especially for case statements and predicate methods like any?. It's even more fun when you realize Proc uses === for call. Taken one step further you can make your own classes which respond to === to do fun things.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Be careful of accidentally using strict equality with
===
like so:That works with
==
but will fail with===
.===
is all types of fun in Ruby, especially forcase
statements and predicate methods likeany?
. It's even more fun when you realizeProc
uses===
forcall
. Taken one step further you can make your own classes which respond to===
to do fun things.