Created
August 19, 2009 17:22
-
-
Save nicolasblanco/170488 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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