2 ms·
> Wait what `Integer ===` (and more generally if `===` is implemented as a class method) checks if the right hand side is of the class Integer. The object Inte
by vidarh 4y ago
> Wait what
`Integer ===` (and more generally if `===` is implemented as a class method) checks if the right hand side is of the class Integer. The object Integer is not, it's an object of class Class.
EDIT: In other words:
$ pry
[1] pry(main)> Integer === Integer
=> false
[2] pry(main)> Class === Integer
=> true
[3] pry(main)> Integer.class
=> Class