[Ironruby-core] Saving to YAML not working as expected.

Nick Hird nrhird at gmail.com
Tue Mar 30 07:07:12 EDT 2010

I am following the Stock Portfolio post from RubyQuiz.com and it
involves using YAML for its storage. Under ruby 1.8.7, the data is
being saved and loaded with no problem. Under ironruby rc4, when it
gets saved  and then retrieved it changes the data to its object type.
For example on the first same it saves the data correctly.

name: !str:CSV::Cell Google Inc.

After a reload of the data it changes the previous line to.

name: !ruby/object:IronRuby::StandardLibrary::Yaml::PrivateType {}

This then throws off what data it is trying to use and display. Is
there something i need to do so that ironruby doesn't change the data
into its type?  This does work correctly under a ruby implementation,
no special gems or anything, just plain ole ruby. I can load and save
the data all day and it works just fine. I prefer ironruby however and
would love to get this working under it.

Link: http://www.rubyquiz.com/quiz41.html


More information about the Ironruby-core mailing list