Hi Is yaml supposed to be working atm because when I try it, it definitely does some weird things. When I run the tests there is one test that fails the yamlorg_refcard.yml. And this is my test.>>> require ''yaml''=> true>>> $t = {:one => "one val", :two => { :nested_first => "nested val" } }=> {:one=>"one val", :two=>{:nested_first=>"nested val"}}>>> $y = YAML::dump $t=> "\n--- !ruby/object:Hash\n!ruby/object:Symbol :one: !ruby/object:String one val\n!ruby/object:Symbol :two: !ruby/obje ct:Hash\n !ruby/object:Symbol :nested_first: !ruby/object:String nested val\n">>> $r = YAML::load $y=> #<Ruby::StandardLibrary::Yaml::PrivateType:0x000005c>>>> $r == $t=> false>>> $r[:one]:0:in `Initialize'': undefined local variable or method `[]'' for #<Ruby::StandardLibrary::Yaml::PrivateType:0x000005c>:Ru by::StandardLibrary::Yaml::PrivateType (NoMethodError) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080620/d6766870/attachment.html>
YAML support currently does what it needs to do in order to run Rails. Beyond that, all bets are off ?. Let the flow of bug reports commence! From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Thursday, June 19, 2008 3:33 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] YAML Hi Is yaml supposed to be working atm because when I try it, it definitely does some weird things. When I run the tests there is one test that fails the yamlorg_refcard.yml. And this is my test.>>> require ''yaml''=> true>>> $t = {:one => "one val", :two => { :nested_first => "nested val" } }=> {:one=>"one val", :two=>{:nested_first=>"nested val"}}>>> $y = YAML::dump $t=> "\n--- !ruby/object:Hash\n!ruby/object:Symbol :one: !ruby/object:String one val\n!ruby/object:Symbol :two: !ruby/obje ct:Hash\n !ruby/object:Symbol :nested_first: !ruby/object:String nested val\n">>> $r = YAML::load $y=> #<Ruby::StandardLibrary::Yaml::PrivateType:0x000005c>>>> $r == $t=> false>>> $r[:one]:0:in `Initialize'': undefined local variable or method `[]'' for #<Ruby::StandardLibrary::Yaml::PrivateType:0x000005c>:Ru by::StandardLibrary::Yaml::PrivateType (NoMethodError) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080619/ac0ef4ab/attachment-0001.html>
You''ve asked for it :) I''ll be on IronRuby from now until sunday so I''ll probably be sending a couple more emails over the next couple of days :) On Fri, Jun 20, 2008 at 10:37 AM, Curt Hagenlocher <curth at microsoft.com> wrote:> YAML support currently does what it needs to do in order to run Rails. > Beyond that, all bets are off J. > > > > Let the flow of bug reports commence! > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Thursday, June 19, 2008 3:33 PM > *To:* ironruby-core at rubyforge.org > *Subject:* [Ironruby-core] YAML > > > > Hi > > Is yaml supposed to be working atm because when I try it, it definitely > does some weird things. When I run the tests there is one test that fails > the yamlorg_refcard.yml. > > And this is my test. > > >>> require ''yaml'' > => true > >>> $t = {:one => "one val", :two => { :nested_first => "nested val" } } > => {:one=>"one val", :two=>{:nested_first=>"nested val"}} > >>> $y = YAML::dump $t > => "\n--- !ruby/object:Hash\n!ruby/object:Symbol :one: !ruby/object:String > one val\n!ruby/object:Symbol :two: !ruby/obje > ct:Hash\n !ruby/object:Symbol :nested_first: !ruby/object:String nested > val\n" > >>> $r = YAML::load $y > => #<Ruby::StandardLibrary::Yaml::PrivateType:0x000005c> > >>> $r == $t > => false > >>> $r[:one] > :0:in `Initialize'': undefined local variable or method `[]'' for > #<Ruby::StandardLibrary::Yaml::PrivateType:0x000005c>:Ru > by::StandardLibrary::Yaml::PrivateType (NoMethodError) > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080620/e5b8ecf2/attachment.html>
I''m currently working on improving yaml implementation. It will be better in next build. One problem you can see in your test is that current implementation doesn''t support loading symbols. That''s because our implementation is a port of early version of JvYAML, which in turn was based on RbYAML, which in turn was based on PyYAML and Python doesn''t have symbols. I''m working on a fix.-- Oleg ---------------------------------------- From: "Ivan Porto Carrero" <ivan at flanders.co.nz> Sent: Thursday, June 19, 2008 10:34 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] YAML Hi Is yaml supposed to be working atm because when I try it, it definitely does some weird things. When I run the tests there is one test that fails the yamlorg_refcard.yml. And this is my test.>>> require ''yaml''=> true>>> $t = {:one => "one val", :two => { :nested_first => "nested val" } }=> {:one=>"one val", :two=>{:nested_first=>"nested val"}}>>> $y = YAML::dump $t=> "\n--- !ruby/object:Hash\n!ruby/object:Symbol :one: !ruby/object:String one val\n!ruby/object:Symbol :two: !ruby/obje ct:Hash\n !ruby/object:Symbol :nested_first: !ruby/object:String nested val\n">>> $r = YAML::load $y=> #<Ruby::StandardLibrary::Yaml::PrivateType:0x000005c>>>> $r == $t=> false>>> $r[:one]:0:in `Initialize'': undefined local variable or method `[]'' for #<Ruby::StandardLibrary::Yaml::PrivateType:0x000005c>:Ru by::StandardLibrary::Yaml::PrivateType (NoMethodError) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080619/433e369d/attachment.html>