Skip to content

Instantly share code, notes, and snippets.

@bmizerany
Created January 29, 2009 12:07
Show Gist options
  • Select an option

  • Save bmizerany/54515 to your computer and use it in GitHub Desktop.

Select an option

Save bmizerany/54515 to your computer and use it in GitHub Desktop.
>> Proc.new { |a| "test" }.call(1)
=> "test"
>> Proc.new { |a| "test" }.call(1,2)
(irb):2: warning: multiple values for a block parameter (2 for 1)
from (irb):2
=> "test"
>> Proc.new { |a| "test" }.call()
(irb):3: warning: multiple values for a block parameter (0 for 1)
from (irb):3
=> "test"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment