I was wondering: && , and , || , or basic kernels are immutable functionality (for example, in other languages, for example: php), or are object methods like & <=> , but some kind of magic path
More on my traits of thoughts:
[] & [10] # => [] [].&([10]) # => [] "aaa".& 10 # NoMethodError: undefined method `&' for "aaa":String
Note that it says an undefined method
... of course you can do.
true.& false
... but you cannot do:
true.&& false
so if it's possible to do
class String
exists (with some magic):
class String
THX

source share