[Ironruby-core] YAML

Ivan Porto Carrero ivan at flanders.co.nz
Thu Jun 19 18:33:10 EDT 2008


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

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
>>> $r = YAML::load $y
=> #<Ruby::StandardLibrary::Yaml::PrivateType:0x000005c>
>>> $r == $t
=> false
>>> $r[:one]
:0:in `Initialize': undefined local variable or method `[]' for
by::StandardLibrary::Yaml::PrivateType (NoMethodError)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080620/d6766870/attachment.html>

More information about the Ironruby-core mailing list