Skip to content

Instantly share code, notes, and snippets.

@FestivalBobcats
Created October 13, 2011 15:19
Show Gist options
  • Save FestivalBobcats/1284489 to your computer and use it in GitHub Desktop.
Save FestivalBobcats/1284489 to your computer and use it in GitHub Desktop.
Ruby splatz
> def a(x,y); end
=> nil
> send :a, [1,2]
ArgumentError: wrong number of arguments (1 for 2)
from (irb):1:in `a'
from (irb):2
from /Users/bhundley/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>'
> send :a, *[1,2]
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment