From: James Tucker Date: 2010-07-22T03:22:34+09:00 Subject: [ruby-core:31418] Re: [Bug #3596] Can Marshal nested Hash from 1.9.2 --> 1.8.7 On 21 Jul 2010, at 17:06, Dreamcat Four wrote: > Bug #3596: Can Marshal nested Hash from 1.9.2 --> 1.8.7 > http://redmine.ruby-lang.org/issues/show/3596 > > Author: Dreamcat Four > Status: Open, Priority: Normal > ruby -v: ruby 1.9.2dev (2010-07-11 revision 28618) [i386-darwin10.4.0] > > Hi, > The loaded Hash object has empty values where the inner hashes should be: > > expected: > {"HashKeyA"=>{"StringA"=>"a"}, "HashKeyB"=>{"StringA"=>"a"}, "HashKeyC"=>{"StringA"=>"a"}, "HashKeyD"=>{"StringA"=>"a"}, "HashKeyE"=>{"StringA"=>"a"}, "HashKeyF"=>{"StringA"=>"a"}, "HashKeyG"=>{"StringA"=>"a"}, "HashKeyH"=>{"StringA"=>"a"}, "HashKeyI"=>{"StringA"=>"a"}, "HashKeyJ"=>{"StringA"=>"a"}, "HashKeyK"=>{"StringA"=>"a"}, "HashKeyL"=>{"StringA"=>"a"}, "HashKeyM"=>{"StringA"=>"a"}, "HashKeyN"=>{"StringA"=>"a"}, "HashKeyO"=>{"StringA"=>"a"}, "HashKeyP"=>{"StringA"=>"a"}, "HashKeyQ"=>{"StringA"=>"a"}, "HashKeyR"=>{"StringA"=>"a"}, "HashKeyS"=>{"StringA"=>"a"}, "HashKeyT"=>{"StringA"=>"a"}, "HashKeyU"=>{"StringA"=>"a"}, "HashKeyV"=>{"StringA"=>"a"}, "HashKeyW"=>{"StringA"=>"a"}, "HashKeyX"=>{"StringA"=>"a"}, "HashKeyY"=>{"StringA"=>"a"}, "HashKeyZ"=>{"StringA"=>"a"}} > > got: > {"HashKeyA"=>{}, "HashKeyB"=>{}, "HashKeyC"=>{}, "HashKeyD"=>{}, "HashKeyE"=>{}, "HashKeyF"=>{}, "HashKeyG"=>{}, "HashKeyH"=>{}, "HashKeyI"=>{}, "HashKeyJ"=>{}, "HashKeyK"=>{}, "HashKeyL"=>{}, "HashKeyM"=>{}, "HashKeyN"=>{}, "HashKeyO"=>{}, "HashKeyP"=>{}, "HashKeyQ"=>{}, "HashKeyR"=>{}, "HashKeyS"=>{}, "HashKeyT"=>{}, "HashKeyU"=>{}, "HashKeyV"=>{}, "HashKeyW"=>{}, "HashKeyX"=>{}, "HashKeyY"=>{}, "HashKeyZ"=>{}} > > The 1.8.7 can reads the keys... but only for the 1st level of the hash. Heh, it *almost* works, just not quite fully there (but nearly!). > > I am guessing this aught to be regarded as a bug because the Marshal Version is 4,8 for both Ruby versions: > > 1.9.2 > $ cat /opt/rvm/src/ruby-1.9.2-rc2/marshal.c | grep '#define MARSHAL_M' > #define MARSHAL_MAJOR 4 > #define MARSHAL_MINOR 8 > > 1.8.7 > $ cat /opt/rvm/src/ruby-1.8.7-p174/marshal.c | grep '#define MARSHAL_M' > #define MARSHAL_MAJOR 4 > #define MARSHAL_MINOR 8 Yup, certainly bouncing that and updating rubyspec would seem like a good idea. What changed in the format, can you dump on both interpreters and compare?