Last active
December 27, 2015 21:39
-
-
Save kouba-c/7393192 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BasicObject | |
def method_missing(method, *args) | |
args[0].__send__ method, self | |
end | |
end | |
p [1,2,3,4,5].include?(1) #=> true | |
p 1.include?([1,2,3,4,5]) #=> true | |
p 1.include([1,2,3,4,5]) #=> endless loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment