12 34 wrote:
> Tim Pease wrote:

> > PhotoEndings = %w(JPG MRW JPE)
> > MovieEndings = %w(AVI)
> >
> > case ext.upcase
> > when *PhotoEndings
> >   puts "I'm a photo!"
> > when *MovieEndings
> >   puts "I'm a movie!"
> > else
> >   puts "I'm unknown '#{ext}'"
> > end

> I don't understand the meaning of the *. I imagine it comes from the
> wildcard usage. What do I look up in my books to understand this.

It has nothing to do with wildcards. The * takes an array and turns it into
a list of arguments. So  args=[a,b,c]; f(*args)  is the same as f(a,b,c) and
when *PhotoEndings  is the same as  when JPG, MRW, JPE


-- 
Ist so, weil ist so
Bleibt so, weil war so