Last active
August 29, 2015 14:16
-
-
Save jballanc/3a36220d9d13fd6fc456 to your computer and use it in GitHub Desktop.
Crazy...
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
dislike = ->() {} | |
like = ->(thing = define_method(:confused, &dislike) && "ice cream") { puts "I like #{thing}" } | |
dislike = ->(thing = define_method(:confused, &like) && "broccoli") { puts "I don't like #{thing}" } | |
define_method(:confused, &like) | |
confused("ayran") | |
confused | |
confused("homework") | |
confused | |
confused("kunefe") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment