From: w_a_x_man@... Date: 2009-01-02T17:11:07+09:00 Subject: Re: Ruby Noobie needs some help On Dec 30, 2:48 pm, r wrote: > Hello, > I am coming from the python world and trying to learn ruby. Why does > this throw an error? > > #testscript.rb > cams = ['cam1', 'cam2', 'cam3'] > def function(s) >     puts s >     for x in cams >         print x >     end > end > test() > You define "function" but never use it. You use "test" but never define it. > In python this is perfectly valid, You assert that this is the Python way. Keep looking over your shoulder for Guido. Cams = %W(cam1 cam2 cam3) def foo s puts s, Cams.join( ", " ) end foo "think"