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

Tomas Matousek Tomas.Matousek at microsoft.com
Tue Mar 30 16:03:27 EDT 2010


Thanks! I've filed a bug http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=4284. 

Tomas

-----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 11:09 AM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] Saving to YAML not working as expected.

My ruby isn't the best so i included the source i am working with.

1) start the script (no args)
2) type "buy 10 msft"
3) type "history" (view output)
4) type "exit"
5) view yaml file (should look good here)
6) start the script again (no args)
7) type "history" (different than before)
8) you'll see the first part of the object type
9) type "exit"
10) view the yaml file

Hope this helps.
-Nick

On Tue, Mar 30, 2010 at 12:07 PM, Tomas Matousek <Tomas.Matousek at microsoft.com> wrote:
> This looks like a bug. Could you sent us a simple self-contained repro? It would help us to identity the issue faster.
>
> Thanks,
> Tomas
>
> -----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
>
> Thanks,
> -Nick
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>



--
--Nick


More information about the Ironruby-core mailing list