From: "Kirill A. Shutemov" Date: 2007-09-13T18:41:12+09:00 Subject: Re: [PATCH] Strange ripper bug --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On [Thu, 13.09.2007 02:58], Kirill A. Shutemov wrote: > On [Wed, 12.09.2007 03:05], Alexey I. Froloff wrote: > > Sometimes, ripper can't parse valid code (trunk from yesterday). > > Examples attached taken from rubygems/format.rb (version 0.9.0). > >=20 > > $ ./sexp format.rb format1.rb format2.rb format3.rb > > # format.rb > > nil > >=20 > > Ripper.sexp returns nil. >=20 > > ./ruby -c ~/tmp/format.rb = =20 > /home/kas/tmp/format.rb:2: syntax error, unexpected ',', expecting tASSOC > format.file_entries << [{"size", entry.size, "mode", entry.mode, > ^ > /home/kas/tmp/format.rb:2: syntax error, unexpected ',', expecting tCOLON= 2 or '[' or '.' > format.file_entries << [{"size", entry.size, "mode", entry.mode, > ^ > /home/kas/tmp/format.rb:3: syntax error, unexpected ',', expecting tCOLON= 2 or '[' or '.' > "path", entry.full_name}, entry.read] > ^ > /home/kas/tmp/format.rb:3: syntax error, unexpected '}', expecting keywor= d_end > "path", entry.full_name}, entry.read] > ^ > /home/kas/tmp/format.rb:3: syntax error, unexpected ']', expecting keywor= d_end >=20 > Cannot use ',' instead of '=3D>' for hash association in ruby 1.9? Really? r12658 | matz | 2007-06-29 09:27:49 +0300 (=D0=9F=D1=8F=D1=82, 29 =D0=A7=D1= =8D=D1=80 2007) | 4 lines * parse.y (assoc_list): remove expanded hash literal (no splat). * lib/webrick/httpstatus.rb (WEBrick::HTTPStatus::EOFError): adapt to new syntax. Rationale? --=20 Regards, Kirill A. Shutemov + Belarus, Minsk + Velesys LLC, http://www.velesys.com/ + ALT Linux Team, http://www.altlinux.com/ --TB36FDmn/VVEgNH/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFG6QXAbWYnhzC5v6oRAi8kAJ45PRZggncx3uD9691ZP+KGEyg7VwCfedm+ pTHWY42ACeq+c4OcYTFngeg= =vNwO -----END PGP SIGNATURE----- --TB36FDmn/VVEgNH/--