Skip to content

Instantly share code, notes, and snippets.

@tobiasvl
Forked from 0x0dea/silly?.rb
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobiasvl/bf749d72d74da7f0efce to your computer and use it in GitHub Desktop.
Save tobiasvl/bf749d72d74da7f0efce to your computer and use it in GitHub Desktop.
Hack to execute one block after another based on a boolean value
def true.-(a, &b) a[] end
def false.-(a, &b) b[] end
(1 == 1).--> { :ok } { fail Math }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment