From: Sebastian Hungerecker Date: 2008-01-31T06:42:53+09:00 Subject: Re: Ruby Puzzle Challenge Dominik Honnef wrote: > > p *1..100 > > Would you be so gentle and explain this piece of code to me? > [...] isn't * a binary operator? I * can be a binary operator, yes, but here it is the unary, prefix splat-operator which takes an array or any object that responds to to_a and turns it into a list of arguments: foo(*[:la,:li,:lu]) becomes foo(:la,:li,:lu) p *1..5 becomes p 1,2,3,4,5 HTH, Sebastian -- Jabber: sepp2k@jabber.org ICQ: 205544826