When using ActiveSupport, YAML dump/load of 3.0 returns YAML::PrivateType
-------------------------------------------------------------------------

                 Key: JRUBY-3423
                 URL: http://jira.codehaus.org/browse/JRUBY-3423
             Project: JRuby
          Issue Type: Bug
          Components: Extensions
            Reporter: Charles Oliver Nutter
             Fix For: JRuby 1.2


This is pretty ugly, I'm surprised we missed it up to now:

{noformat}
$ jirb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'activesupport'
=> true
irb(main):003:0> YAML.load(YAML.dump(3.0))
=> #<YAML::PrivateType:0x96eaf8 @type_id="tag:yaml.org,2002:float:Float", 
@value="3.0">
irb(main):004:0> YAML.load(YAML.dump(3.0)).value
=> "3.0"
irb(main):005:0> YAML.load(YAML.dump(3.0)).value.to_f
=> 3.0
{noformat}

MRI immediately returns float 3.0 for the load.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to