From: dblack@... Date: 2006-06-08T06:41:43+09:00 Subject: Re: Possible YAML bug with quoted symbols? Hi -- On Thu, 8 Jun 2006, Logan Capaldo wrote: > > On Jun 7, 2006, at 2:53 PM, ara.t.howard@noaa.gov wrote: > >> On Thu, 8 Jun 2006, Logan Capaldo wrote: >> >>> ara, try this: >>> >>> % irb >>> irb(main):001:0> require 'yaml' >>> => true >>> irb(main):002:0> sym = :"a symbol" >>> => :"a symbol" >>> irb(main):003:0> sym == sym >>> => true >>> irb(main):004:0> sym == YAML.load(YAML.dump(sym)) >>> => false >>> irb(main):005:0> sym >>> => :"a symbol" >>> irb(main):006:0> YAML.load(YAML.dump(sym)) >>> => :"\"a symbol\"" >>> irb(main):007:0> VERSION >>> => "1.8.4" >>> >>> Looks like a bug to me. >> >> >> >> harp:~ > irb -r yaml >> irb(main):001:0> sym = :"a symbol" >> => :"a symbol" >> irb(main):002:0> sym == sym >> => true >> irb(main):003:0> sym == YAML.load(YAML.dump(sym)) >> => true >> irb(main):004:0> sym >> => :"a symbol" >> irb(main):005:0> YAML.load(YAML.dump(sym)) >> => :"a symbol" >> irb(main):006:0> VERSION >> => "1.8.4" >> >> >> looks like a bad ruby to me. a package installer? mine is compiled on rhe >> and >> seems to work fine? >> >> >> -a >> -- >> suffering increases your inner strength. also, the wishing for suffering >> makes the suffering disappear. >> - h.h. the 14th dali lama >> > > Compiled from source on OS X. Yay! A platform-specific problem. My favorite. I think it's a platform-specific solution -- that is, it only works on Ara's computer :-) I get the same results you get, on my Mac and on a PC running Fedora. I guess RHE must have patched Ruby in some way. David -- David A. Black (dblack@wobblini.net) * Ruby Power and Light, LLC (http://www.rubypowerandlight.com) > Ruby and Rails consultancy and training * Author of "Ruby for Rails" from Manning Publications! > http://www.manning.com/black