Skip to content

Instantly share code, notes, and snippets.

@jballanc jballanc/confused.rb
Last active Aug 29, 2015

Embed
What would you like to do?
Crazy...
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
You can’t perform that action at this time.