Skip to content

Instantly share code, notes, and snippets.

@abuiles
Created March 20, 2012 17:27
Show Gist options
  • Save abuiles/2138387 to your computer and use it in GitHub Desktop.
Save abuiles/2138387 to your computer and use it in GitHub Desktop.
a = Proc.new{ |*args| puts "hello" }
def foo(*args)
if block_given?
yield *args
end
end
foo(1,2) do |*args|
a.call(*args)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment