Jesse Cooke created JRUBY-6470:
----------------------------------
Summary: YAML.dump isn't dumping classes like MRI
Key: JRUBY-6470
URL: https://jira.codehaus.org/browse/JRUBY-6470
Project: JRuby
Issue Type: Bug
Components: Ruby 1.9.3
Affects Versions: JRuby 1.6.6
Reporter: Jesse Cooke
Assignee: Thomas E Enebo
Attachments: scratch.rb
Found when I was trying to get mperham/sidekiq up on Travis with JRuby 1.6.6.
MRI 1.9.3 will output the attached script with the correct YAML representation
of the array (var obj)
---
- !ruby/class 'MyMailer'
- :greetings
- - 1
- 2
JRuby throws a TypeError
TypeError: can't dump anonymous class Class
visit_Class at
/home/jesse/.rvm/rubies/jruby-1.6.6/lib/ruby/1.9/psych/visitors/yaml_tree.rb:211
__send__ at org/jruby/RubyBasicObject.java:1700
send at org/jruby/RubyKernel.java:2099
accept at
/home/jesse/.rvm/rubies/jruby-1.6.6/lib/ruby/1.9/psych/visitors/yaml_tree.rb:63
visit_Array at
/home/jesse/.rvm/rubies/jruby-1.6.6/lib/ruby/1.9/psych/visitors/yaml_tree.rb:246
each at org/jruby/RubyArray.java:1614
visit_Array at
/home/jesse/.rvm/rubies/jruby-1.6.6/lib/ruby/1.9/psych/visitors/yaml_tree.rb:246
__send__ at org/jruby/RubyBasicObject.java:1700
send at org/jruby/RubyKernel.java:2099
accept at
/home/jesse/.rvm/rubies/jruby-1.6.6/lib/ruby/1.9/psych/visitors/yaml_tree.rb:63
<< at
/home/jesse/.rvm/rubies/jruby-1.6.6/lib/ruby/1.9/psych/visitors/yaml_tree.rb:36
dump at /home/jesse/.rvm/rubies/jruby-1.6.6/lib/ruby/1.9/psych.rb:165
(root) at scratch.rb:12
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.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