Hello all,
(This may be my first post for this list.)

On Fri, 16 Jun 2006 01:33:54 +0900
"Joao Pedrosa" <joaopedrosa / gmail.com> wrote:

> dewd@marieta:~/t_$ /opt/ruby-1.9.0/bin/ruby rbug.rb
> rbug.rb:6: syntax error, unexpected kDO_BLOCK, expecting tSTRING_CONTENT or
> tSTRING_DBEG or tSTRING_DVAR or tSTRING_END
> cmd :do do
>        ^
> dewd@marieta:~/t_$ cat rbug.rb
> 
> 
> def cmd *a
> end
> 
> cmd :do do
> end

It is reproduced in my box, too.

$ cat getkeywords.rb
keywords = []
while gets
  ary = $_.split(/,\s/)
  keywords << ary[0] if ary.length == 4
end
puts "def m(a); end"
keywords.each do |k|
  puts "m :" + k
end
$ ruby getkeywords.rb <cvs/ruby/keywords >testkeywords.rb
$ ruby testkeywords.rb
testkeywords.rb:14: syntax error
$ head -14 testkeywords.rb | tail -1
m :do
$ ruby -v
ruby 1.8.2 (2005-04-11) [i386-linux]

The error only happens in ":do" line; i.e., I couldn't catch
any error if I commented out the line.

I tested the same script in other environments, then got error too:

$ ruby -v testkeywords.rb
ruby 1.9.0 (2006-06-16) [powerpc-darwin8.6.0]
testkeywords.rb:14: parse error, expecting `tSTRING_CONTENT' or 
`tSTRING_DBEG' or `tSTRING_DVAR' or `tSTRING_END'
$ ruby-1.8 -v testkeywords.rb
ruby 1.8.4 (2006-06-15) [powerpc-darwin8.6.0]
testkeywords.rb:14: parse error, expecting `tSTRING_CONTENT' or 
`tSTRING_DBEG' or `tSTRING_DVAR' or `tSTRING_END'

--
Tadashi Saito