Marshal.dump and load don't treat ints the same -----------------------------------------------
Key: JRUBY-2257 URL: http://jira.codehaus.org/browse/JRUBY-2257 Project: JRuby Issue Type: Bug Affects Versions: JRuby 1.1RC2 Reporter: Matt Burke Assignee: Thomas E Enebo Marshall.dump()ing ints that are between MRI's Fixnum/Bignum limit and JRuby's Fixnum/Bignum limit messes up the link table during Marshal.load(). For example, the following code produces an exception. The code: {code} def desc x marshalled = Marshal.dump x puts marshalled.inspect rehydrated = Marshal.load marshalled puts rehydrated.inspect rehydrated end n = 1234567890 s = 'abcdefg' desc [s,n,s] desc [n,s,s] {code} The output: {noformat} "\004\b[\b\"[EMAIL PROTECTED]" ["abcdefg", 1234567890, "abcdefg"] "\004\b[\bl+\a\322\002\226I\"[EMAIL PROTECTED]" blah.rb:4:in `desc': dump format error (unlinked, index: 2) (ArgumentError) from blah.rb:12 {noformat} -- 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