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

Tomas Matousek Tomas.Matousek at microsoft.com
Tue Mar 30 12:07:43 EDT 2010

This looks like a bug. Could you sent us a simple self-contained repro? It would help us to identity the issue faster.


-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Nick Hird
Sent: Tuesday, March 30, 2010 4:07 AM
To: Ironruby-core at rubyforge.org
Subject: [Ironruby-core] Saving to YAML not working as expected.

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

Ironruby-core mailing list
Ironruby-core at rubyforge.org

More information about the Ironruby-core mailing list