From: Grimble Date: 2009-08-02T01:35:04+09:00 Subject: Re: Syntax error from element.rb Tim Hunter wrote: > Grimble wrote: >> Not a regular Ruby developer. >> Rebuilding a Ruby environment after moving from Mandriva 2008.0 to 2009.1. >> >> ruby 1.8.7 (2008-08-11 patchlevel 72) [i586-linux] >> ruby-svg-1.0.2 >> I get the following error trace >> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in >> `gem_original_require': /usr/lib/ruby/site_ruby/1.8/svg/element.rb:423: >> syntax error, unexpected $undefined (SyntaxError) >> svg << %| textLength="#{@}"| if @length >> ^ > > svg << %| textLength="#{@}"| if @length > > isn't legal Ruby. The @ can't stand alone. It's a prefix indicating an > instance variable, like "@length". I don't know why it wasn't being > diagnosed before. It looks like an search-and-replace error of some sort. > Tim, thanks for a quick reply. I checked back to the previous version: # $Id: element.rb,v 1.14 2003/02/06 14:59:43 yuya Exp $ The corresponding line was indeed: svg << %| textLength="#{@length}"| if @length So, I shall make the appropriate edit and retry. Does this need to be reported as a bug? Regards Grimble