Created
September 2, 2013 23:22
-
-
Save cronin101/6418126 to your computer and use it in GitHub Desktop.
Trapdoor method
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
| main ⭔ define_method :secret_message, ->{ ->{ define_method :secret_message, ->{ "Too late" } }.() && "I hope you remember this" } | |
| #=> #<Proc:0x007fb74ad90f68@(pry):21 (lambda)> | |
| main ⭔ secret_message | |
| #=> "I hope you remember this" | |
| main ⭔ secret_message | |
| #=> "Too late" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment