From: David Alan Black Date: 2002-05-15T07:42:57+09:00 Subject: Re: Strange Ruby String behavior Hello -- On Wed, 15 May 2002, Sean Russell wrote: > I discovered some bizarre behavior in Ruby, and I wonder if there's an > answer. I don't believe it is a bug, per se, but it is strange. > > I had the following line of code: > > PUBIDCHAR = "\x20\x0D\x0Aa-zA-Z0-9-()+,./:=?;!*#@$_%" > > See the '#' near the end? The strange thing is that, time after time, this > didn't cause Ruby 1.6.6 to choke on my Linux box -- however, when Markus > tried to run it on 1.6.5 on his machine (some Unix or Linux variant, I'm > not sure which), it gave him an error: > > /usr/local/lib/ruby/site_ruby/1.6/rexml/entity.rb:8: compile error in > string expansion (SyntaxError) > > Was this something that changed between 1.6.5 and 1.6.6, or am I seeing > something else? The question is probably moot; I moved the hash to the end > of the string and there are no problems. I'm just curious. It looks like is was a change. Scanning the 1.6.6 ChangeLog: * parse.y (str_extend): should not process immature #$x and #@x interportation, e.g #@#@ etc. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav