Skip to content

Instantly share code, notes, and snippets.

@eam
Created April 8, 2015 20:19
Show Gist options
  • Save eam/e9a894ccc172a55bdf16 to your computer and use it in GitHub Desktop.
Save eam/e9a894ccc172a55bdf16 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
def foo(&block)
fn = Proc.new { "hello" + " world!" }
puts block.call(fn)
end
foo { |x|
x.call
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment