Project

General

Profile

Actions

Bug #1709

closed

Marshal.dump Uses Different Definition of 'Depth' on 1.9?

Added by runpaint (Run Paint Run Run) almost 15 years ago. Updated about 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2dev (2009-06-27 trunk 23871) [i686-linux]
Backport:
[ruby-core:24100]

Description

=begin
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 `<main>'

 $ 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?
=end

Actions #1

Updated by nobu (Nobuyoshi Nakada) almost 15 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r23918.
=end

Actions

Also available in: Atom PDF

Like0
Like0