Skip to content

Instantly share code, notes, and snippets.

@quinn
Created October 6, 2008 19:09
Show Gist options
  • Save quinn/15099 to your computer and use it in GitHub Desktop.
Save quinn/15099 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'ruby2ruby'
def fun *proc, &blk
if block_given?
puts blk.to_ruby
else
puts proc[0].to_ruby
end
end
fun lambda {
puts 'do somfin'
}
fun {
puts 'do somfin'
}
proc { puts("do somfin") }
proc { puts("do somfin") }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment