harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Qiu (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4781) [test] To serialize the range type of jruby into yaml form, harmony generate different sequence from RI
Date Thu, 13 Sep 2007 05:33:32 GMT
[test] To serialize the range type of jruby into yaml form, harmony generate different sequence
from RI
-------------------------------------------------------------------------------------------------------

                 Key: HARMONY-4781
                 URL: https://issues.apache.org/jira/browse/HARMONY-4781
             Project: Harmony
          Issue Type: Bug
          Components: App-Oriented Bug Reports
            Reporter: Sean Qiu


Introduction:
yaml for ruby is similar to xml for java. So it is very important for jruby.
To serialize the range type of jruby into yaml form, harmony generate different sequence from
RI
Range is a data type in ruby,  it has a begin, end and a excl element to different from each
other.
excl is true means it exclude the last data in the range.

Issue Description:

[1...3].to_yaml    // get the range's yaml form

1) Harmony will generate
--- !ruby/range
end: 100000
excl: true
begin: 0

2) RI will generate
--- !ruby/range
begin: 0
end: 100000
excl: true

They are not equal in jruby.

Reason:
Range using HashMap to record the begin,end and excl element.
Their output order is the same in every Range, since their key value are always the same.
But the order is different in Harmony.

===== RI =====
Key= #<org.jvyamlb.nodes.ScalarNode (tag=tag:yaml.org,2002:str, value=begin)>,  Hash=
562035919
Key= #<org.jvyamlb.nodes.ScalarNode (tag=tag:yaml.org,2002:str, value=end)>,  Hash=
541525921
Key= #<org.jvyamlb.nodes.ScalarNode (tag=tag:yaml.org,2002:str, value=excl)>,  Hash=
542781097

=====Harmony =====
Key= #<org.jvyamlb.nodes.ScalarNode (tag=tag:yaml.org,2002:str, value=end)>,  Hash=
541525921
Key= #<org.jvyamlb.nodes.ScalarNode (tag=tag:yaml.org,2002:str, value=excl)>,   Hash=
542781097
Key= #<org.jvyamlb.nodes.ScalarNode (tag=tag:yaml.org,2002:str, value=begin)>,  Hash=
562035919

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message