From: Run Paint Run Run Date: 2009-07-01T07:34:32+09:00 Subject: [ruby-core:24100] [Bug #1709] Marshal.dump Uses Different Definition of 'Depth' on 1.9? Bug #1709: Marshal.dump Uses Different Definition of 'Depth' on 1.9? http://redmine.ruby-lang.org/issues/show/1709 Author: Run Paint Run Run Status: Open, Priority: Normal Category: core ruby -v: ruby 1.9.2dev (2009-06-27 trunk 23871) [i686-linux] Marshal.dump issues an "exceed depth limit" on 1.9 when the same data structure with the same depth dumps correctly on 1.8. $ ruby8 -ve "h={'one'=>{'two'=>{'three'=>0}}}; p Marshal.dump(h,4)" ruby 1.8.8dev (2009-06-28) [i686-linux] "\004\b{\006\"\bone{\006\"\btwo{\006\"\nthreei\000" $ ruby -ve "h={'one'=>{'two'=>{'three'=>0}}}; p Marshal.dump(h,4)" ruby 1.9.2dev (2009-06-27 trunk 23871) [i686-linux] -e:1:in `dump': exceed depth limit (ArgumentError) from -e:1:in `
' $ ruby -ve "h={'one'=>{'two'=>{'three'=>0}}}; p Marshal.dump(h,5)" ruby 1.9.2dev (2009-06-27 trunk 23871) [i686-linux] "\x04\b{\x06I\"\bone\x06:\x06ET{\x06I\"\btwo\x06;\x00T{\x06I\"\nthree\x06;\x00Ti\x00" Is this difference intentional? If so, how is 'depth' defined on 1.9? ---------------------------------------- http://redmine.ruby-lang.org