From: Mark Thomas Date: 2008-11-07T07:43:13+09:00 Subject: Re: Showing a spinner ? On Nov 5, 10:14 am, Aldric Giacomoni wrote: > I don't see anything different about this code, except 'cycle' which is > neat. > Why assign the array to 'a' if we're just gonna iterate through it > anyway, though? You're right--that was a copy and paste error. The assignment shouldn't be there. Another neat thing about cycle: you can do this a = ["green","yellow","red"].cycle Now a is an iterator with special behavior: a.next #=> "green" a.next #=> "yellow" a.next #=> "red" a.next #=> "green" -- Mark.