Skip to content

Instantly share code, notes, and snippets.

@jsmestad
Created April 5, 2009 05:06
Show Gist options
  • Select an option

  • Save jsmestad/90375 to your computer and use it in GitHub Desktop.

Select an option

Save jsmestad/90375 to your computer and use it in GitHub Desktop.
# Working example
def test &block
bind = yield 1, 2, 3
p eval('local_variables', bind)
end
test do |just, some, params|
binding
end
# => ['just', 'some', 'params']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment