Skip to content

Instantly share code, notes, and snippets.

@jimweirich
Created September 15, 2012 19:50
Show Gist options
  • Select an option

  • Save jimweirich/3729476 to your computer and use it in GitHub Desktop.

Select an option

Save jimweirich/3729476 to your computer and use it in GitHub Desktop.
Seems to work
$ ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.2.0]
$ irb
>> RUBY_VERSION
=> "1.8.7"
>> p = lambda { |*args, &block| puts [args, block].inspect }
=> #<Proc:0x000000010b97b678@(irb):2>
>> p.call(1,2,3) { :hi }
[[1, 2, 3], #<Proc:0x000000010b94bef0@(irb):3>]
=> nil
>> exit
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment