Created
February 10, 2011 19:07
-
-
Save foca/821116 to your computer and use it in GitHub Desktop.
This is totally evil.
This file contains hidden or 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
o1 = Object.new | |
o2 = Object.new | |
def (1 > 2 ? o1 : o2).blah | |
puts "blah" | |
end | |
o2.blah #=> puts "blah" | |
o1.blah #=> NoMethodError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So python also supports this (via @tiodante)