mischa / splat

A simple set of examples you can run to figure out how * works in Ruby

This URL has Read+Write access

splat /
name age message
file .gitignore Thu Feb 26 04:09:00 -0800 2009 splat [mischa]
file README Thu Feb 26 04:11:11 -0800 2009 readme [mischa]
file diff.rb Fri Feb 27 10:02:15 -0800 2009 add diffs [mischa]
file example.rb Thu Feb 26 04:43:53 -0800 2009 improvements [mischa]
file ruby_186.txt Fri Feb 27 10:02:15 -0800 2009 add diffs [mischa]
file ruby_191.txt Fri Feb 27 10:02:15 -0800 2009 add diffs [mischa]
file splat.rb Thu Feb 26 05:19:40 -0800 2009 updates from ruby listhost [mischa]
README
Hi,


In ruby [*[1,2,3]] == [1,2,3]. 

It doesn't stop there. The splat does all kinds of stuff.



To play with it, clone this, and then run splat.rb.


If you want, you can try to guess what ruby will give.

Run it in both 1.8 and 1.9 to see the differences.


Best,

Mischa