Project

General

Profile

Bug #6625

broken Marshal compatibilities on Complex and Rational

Added by Nobuyoshi Nakada about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:45775]

Description

=begin
(({Complex})) and (({Rational})) dumped by 1.8 or earlier cannot be loaded by trunk.

$ /usr/bin/ruby -v
ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]

$ ruby -v
ruby 2.0.0dev (2012-06-22 trunk 36175) [universal.x86_64-darwin11]

$ /usr/bin/ruby -rcomplex -e 'Marshal.dump(Complex(0, 0), STDOUT)' | ruby -e 'p Marshal.load(STDIN)'
-e:1:in load': dump format error (ArgumentError)
from -e:1:in
'
bash: exit 1

$ /usr/bin/ruby -rrational -e 'Marshal.dump(Rational(0), STDOUT)' | ruby -e 'p Marshal.load(STDIN)'
-e:1:in load': dump format error (ArgumentError)
from -e:1:in
'
bash: exit 1

Patch attached.
=end

0001-compatible-marshal-loader.patch View (5.6 KB) Nobuyoshi Nakada, 06/22/2012 02:08 PM

Associated revisions

Revision 36538
Added by Nobuyoshi Nakada about 4 years ago

complex.c, rational.c: compatible marshal loader

  • complex.c, rational.c: compatible marshal loader for compatibilities with 1.8. [Bug #6625]

Revision 36538
Added by Nobuyoshi Nakada about 4 years ago

complex.c, rational.c: compatible marshal loader

  • complex.c, rational.c: compatible marshal loader for compatibilities with 1.8. [Bug #6625]

Revision 36538
Added by Nobuyoshi Nakada about 4 years ago

complex.c, rational.c: compatible marshal loader

  • complex.c, rational.c: compatible marshal loader for compatibilities with 1.8. [Bug #6625]

History

#1 [ruby-core:45791] Updated by tadayoshi funaba about 4 years ago

  • Priority changed from Normal to 3

should we still support 1.8 dump?

#2 [ruby-core:45810] Updated by Shyouhei Urabe about 4 years ago

tadf (tadayoshi funaba) wrote:

should we still support 1.8 dump?

Yes please. We no longer need to write old formats, but I still need to read. Otherwise I cannot convert them into new formats.

#3 [ruby-core:45819] Updated by tadayoshi funaba about 4 years ago

ok, support forever.

#4 Updated by Nobuyoshi Nakada about 4 years ago

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

This issue was solved with changeset r36538.
Nobuyoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


complex.c, rational.c: compatible marshal loader

  • complex.c, rational.c: compatible marshal loader for compatibilities with 1.8. [Bug #6625]

Also available in: Atom PDF