Yecht doesn't properly handle Java enums
----------------------------------------
Key: JRUBY-4888
URL: http://jira.codehaus.org/browse/JRUBY-4888
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.5
Environment: Windows
Reporter: Colin Strasser
Assignee: Thomas E Enebo
Prior to Yecht, one could marshal and unmarshal a Java enum into YAML:
>> YAML::load(Java::JavaMath::RoundingMode::UP.to_yaml)
=> #<Java::JavaMath::RoundingMode:0x6d4080
@java_object=#<Java::JavaObject:0xa5d24b>>
Now, doing the same yields garbage:
>> YAML::load(JavaMath::RoundingMode::UP.to_yaml)
=> #<Java::JavaMath::RoundingMode:0x0>
The 0x0 isn't a valid enum value, so attempting to operate on this "class"
produces an error:
>> YAML::load(JavaMath::RoundingMode::UP.to_yaml).to_s
SystemStackError: stack level too deep
from (irb):74
whereas in earlier versions it didn't:
>> YAML::load(Java::JavaMath::RoundingMode::UP.to_yaml).to_s
=> "#<Java::JavaMath::RoundingMode:0x1dc7b85>"
--
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