Skip to content

Instantly share code, notes, and snippets.

@nicolasblanco
Created August 19, 2009 17:22
Show Gist options
  • Save nicolasblanco/170488 to your computer and use it in GitHub Desktop.
Save nicolasblanco/170488 to your computer and use it in GitHub Desktop.
imac-de-nicolas-blanco:THE-SPHERE nicolas$ irb
irb(main):001:0> def cool(a, b, c)
irb(main):002:1> a+b+c
irb(main):003:1> end
=> nil
irb(main):004:0> cool(1,2,3)
=> 6
irb(main):005:0> t = [1,2,3]
=> [1, 2, 3]
irb(main):006:0> cool t
ArgumentError: wrong number of arguments (1 for 3)
from (irb):6:in `cool'
from (irb):6
irb(main):007:0> cool *t
=> 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment