thanks for all your replies. 2009. 01. 08, ¤í 8:46, Eustquio Rangel : > Hi! > > 2009/1/8 Jun Young Kim <jykim / altibase.com>: >> what's the definition of '*'? >> is this pointer? > > It's called "splat operator". You can use it to "explode" your array > elements or join some variables on an array. Note the difference: > > irb(main):001:0> a = [1,2]; b = [3,4] > => [3, 4] > irb(main):002:0> a.push(b) > => [1, 2, [3, 4]] > irb(main):003:0> a.push(*b) > => [1, 2, [3, 4], 3, 4] > > And now: > > irb(main):004:0> def test(*args) > irb(main):005:1> p args > irb(main):006:1> end > => nil > irb(main):007:0> test(1) > [1] > => nil > irb(main):008:0> test(1,2,3) > [1, 2, 3] > > Regards, > >