--nextPart15035682.qz6b9sZBiX
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

quoth the Chih-Chao Lam:
> Apologies for a newbie ruby question:
>
> I know an asterisk can precede a parameter in the argument list of a
> method definition as in
>
> def varargs(arg1, *rest)
>

def varargs(arg1, *rest)
  puts arg1
  rest.each |arg|
    puts arg
  end
end

> varargs(one, two, three, four, five)
one
two
three
four
five
>

Really, it just accumulates a variable amount of arguments and presents the=
m=20
in the function as a list.=20

**kwargs will collect them in a hash.

> Thanks,
> chao

=2Dd
=2D-=20
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
=2D Dennis Ritchie and Ken Thompson, June 1972

--nextPart15035682.qz6b9sZBiX
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBE70qcwPD5Cr/3CJgRArPeAJkBsEk7dBuOWvyyg7Wvt5g0MynPowCgyyuw
JZRCUUB6OJ1CcsRjPB5u9JY=
=4F9V
-----END PGP SIGNATURE-----

--nextPart15035682.qz6b9sZBiX--