From: Justin Collins Date: 2010-10-01T12:06:03+09:00 Subject: Re: Syntax error Anthony Ob wrote: > John Sikora wrote: > >>> Sorry I forgot to post this. >>> http://rubylearning.com/satishtalim/ruby_blocks.html >>> I was doing that above the summary in the code, above the output. >>> >> If I read the example correctly, the colon (:) should be a semi-colon >> (;). >> >> js >> > > I have done that and it says: > Test6.rb:4 syntax error, unexpected ';', tCOLON2 or '[' or '.' > 3.times do |y;X| > > test6.rb:5: syntax error, unexpected tSTRING_BEG, expecting kDO or '<' > or '<' > puts "Looping #{y}" > > test6.rb:7: syntax error, unexpected kEND, expecting $end] > > As the page notes, this was introduced in Ruby 1.9.1. I'm guessing you are using an older version. -Justin