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: Ruby Quiz - Stock Portfolios (#41)

Thanks,
-Nick

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

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 M.

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

Tomas

Not sure if this is related, but I just tried building on Mono 2.6.3 on
the
Mac and am getting a build error here:

yaml

BuiltinsOps.cs(135,17): warning CS0168: The variable encoding' is declared but never used Engine/BaseConstructor.cs(661,41): error CS1501: No overload for method ToUpperInvariant’ takes `0’ arguments
Compilation failed: 1 error(s), 1 warnings
rake aborted!
Command failed with status (1): [gmcs /noconfig
@/var/folders/LV/LVQdctQPGL…]

Could there be something related?

Ryan R.

Email: [email protected]
LinkedIn: http://www.linkedin.com/in/ryanriley
Blog: http://wizardsofsmart.net/
Twitter: @panesofglass
Website: http://panesofglass.org/

Tomas M. wrote:

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

Tomas

Hello Tomas! I’m having the exact same problem as Nick. Unfortunately,
this error is a show stopper for me. I’m writing an application that
needs to read a ton of YAML, and I can’t do any testing until this bug
is fixed. I’d love to stub out part of the code to continue testing, but
that’s not a possibility in my particular case (my app needs to load
~100 Ruby scripts that I do not have any control over).

Is there any chance that the priority on this could be bumped up (please
:p)? I’d do my testing off the trunk if this gets patched before RC5.

(BTW, I left a comment on the CodePlex site.)

Thanks,
-Charles

Nope, this looks more like a bug in Mono (or the rake build).

Tomas

From: [email protected]
[mailto:[email protected]] On Behalf Of Ryan R.
Sent: Tuesday, March 30, 2010 9:07 PM
To: [email protected]
Subject: Re: [Ironruby-core] Saving to YAML not working as expected.

Not sure if this is related, but I just tried building on Mono 2.6.3 on
the Mac and am getting a build error here:

yaml

BuiltinsOps.cs(135,17): warning CS0168: The variable encoding' is declared but never used Engine/BaseConstructor.cs(661,41): error CS1501: No overload for method ToUpperInvariant’ takes `0’ arguments
Compilation failed: 1 error(s), 1 warnings
rake aborted!
Command failed with status (1): [gmcs /noconfig
@/var/folders/LV/LVQdctQPGL…]

Could there be something related?

Ryan R.

Email: [email protected]mailto:[email protected]
LinkedIn: http://www.linkedin.com/in/ryanriley
Blog: http://wizardsofsmart.net/
Twitter: @panesofglass
Website: http://panesofglass.org/

On Tue, Mar 30, 2010 at 7:36 PM, Charles S.
<[email protected]mailto:[email protected]> wrote:
Tomas M. wrote:

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

Tomas
Hello Tomas! I’m having the exact same problem as Nick. Unfortunately,
this error is a show stopper for me. I’m writing an application that
needs to read a ton of YAML, and I can’t do any testing until this bug
is fixed. I’d love to stub out part of the code to continue testing, but
that’s not a possibility in my particular case (my app needs to load
~100 Ruby scripts that I do not have any control over).

Is there any chance that the priority on this could be bumped up (please
:p)? I’d do my testing off the trunk if this gets patched before RC5.

(BTW, I left a comment on the CodePlex site.)

Thanks,
-Charles

Posted via http://www.ruby-forum.com/.


Ironruby-core mailing list
[email protected]mailto:[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Does Xbuild work then (in place of rake)? Or do we still have issues
with casing and such?

JD

From: [email protected]
[mailto:[email protected]] On Behalf Of Tomas M.
Sent: Tuesday, March 30, 2010 11:00 PM
To: [email protected]
Subject: Re: [Ironruby-core] Saving to YAML not working as expected.

Nope, this looks more like a bug in Mono (or the rake build).

Tomas

From: [email protected]
[mailto:[email protected]] On Behalf Of Ryan R.
Sent: Tuesday, March 30, 2010 9:07 PM
To: [email protected]
Subject: Re: [Ironruby-core] Saving to YAML not working as expected.

Not sure if this is related, but I just tried building on Mono 2.6.3 on
the Mac and am getting a build error here:

yaml

BuiltinsOps.cs(135,17): warning CS0168: The variable encoding' is declared but never used Engine/BaseConstructor.cs(661,41): error CS1501: No overload for method ToUpperInvariant’ takes `0’ arguments
Compilation failed: 1 error(s), 1 warnings
rake aborted!
Command failed with status (1): [gmcs /noconfig
@/var/folders/LV/LVQdctQPGL…]

Could there be something related?

Ryan R.

Email: [email protected]mailto:[email protected]
LinkedIn: http://www.linkedin.com/in/ryanriley
Blog: http://wizardsofsmart.net/
Twitter: @panesofglass
Website: http://panesofglass.org/
On Tue, Mar 30, 2010 at 7:36 PM, Charles S.
<[email protected]mailto:[email protected]> wrote:
Tomas M. wrote:

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

Tomas
Hello Tomas! I’m having the exact same problem as Nick. Unfortunately,
this error is a show stopper for me. I’m writing an application that
needs to read a ton of YAML, and I can’t do any testing until this bug
is fixed. I’d love to stub out part of the code to continue testing, but
that’s not a possibility in my particular case (my app needs to load
~100 Ruby scripts that I do not have any control over).

Is there any chance that the priority on this could be bumped up (please
:p)? I’d do my testing off the trunk if this gets patched before RC5.

(BTW, I left a comment on the CodePlex site.)

Thanks,
-Charles

Posted via http://www.ruby-forum.com/.


Ironruby-core mailing list
[email protected]mailto:[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Unfortunately Mono C# compiler in 2.6.3 is broken again. I haven’t had
time to investigate yet, but I’ll look at that in a week or two.

In any case xbuild is the way how to build IronRuby and IronPython on
Mono. We are not going to maintain rake files that duplicate msbuild
project system.

Tomas

From: [email protected]
[mailto:[email protected]] On Behalf Of Jim D.
Sent: Wednesday, March 31, 2010 10:04 AM
To: [email protected]
Subject: Re: [Ironruby-core] Saving to YAML not working as expected.

Does Xbuild work then (in place of rake)? Or do we still have issues
with casing and such?

JD

From: [email protected]
[mailto:[email protected]] On Behalf Of Tomas M.
Sent: Tuesday, March 30, 2010 11:00 PM
To: [email protected]
Subject: Re: [Ironruby-core] Saving to YAML not working as expected.

Nope, this looks more like a bug in Mono (or the rake build).

Tomas

From: [email protected]
[mailto:[email protected]] On Behalf Of Ryan R.
Sent: Tuesday, March 30, 2010 9:07 PM
To: [email protected]
Subject: Re: [Ironruby-core] Saving to YAML not working as expected.

Not sure if this is related, but I just tried building on Mono 2.6.3 on
the Mac and am getting a build error here:

yaml

BuiltinsOps.cs(135,17): warning CS0168: The variable encoding' is declared but never used Engine/BaseConstructor.cs(661,41): error CS1501: No overload for method ToUpperInvariant’ takes `0’ arguments
Compilation failed: 1 error(s), 1 warnings
rake aborted!
Command failed with status (1): [gmcs /noconfig
@/var/folders/LV/LVQdctQPGL…]

Could there be something related?

Ryan R.

Email: [email protected]mailto:[email protected]
LinkedIn: http://www.linkedin.com/in/ryanriley
Blog: http://wizardsofsmart.net/
Twitter: @panesofglass
Website: http://panesofglass.org/
On Tue, Mar 30, 2010 at 7:36 PM, Charles S.
<[email protected]mailto:[email protected]> wrote:
Tomas M. wrote:

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

Tomas
Hello Tomas! I’m having the exact same problem as Nick. Unfortunately,
this error is a show stopper for me. I’m writing an application that
needs to read a ton of YAML, and I can’t do any testing until this bug
is fixed. I’d love to stub out part of the code to continue testing, but
that’s not a possibility in my particular case (my app needs to load
~100 Ruby scripts that I do not have any control over).

Is there any chance that the priority on this could be bumped up (please
:p)? I’d do my testing off the trunk if this gets patched before RC5.

(BTW, I left a comment on the CodePlex site.)

Thanks,
-Charles

Posted via http://www.ruby-forum.com/.


Ironruby-core mailing list
[email protected]mailto:[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core