Project

General

Profile

Actions

Bug #6652

closed

broken Marshal compatibilities on Date and DateTime

Added by nobu (Nobuyoshi Nakada) almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Target version:
ruby -v:
2.0.0
Backport:
[ruby-core:<unknown>]

Description

=begin
(({Date})) and (({DateTime})) 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-26 trunk 36225) [universal.x86_64-darwin11]

$ /usr/bin/ruby -rdate -e 'Marshal.dump(Date.today, STDOUT)' | ruby -rdate -e 'p Marshal.load(STDIN)'
-e:1:in load': class Date needs to have method _load' (TypeError)
from -e:1:in `'
bash: exit 1

$ /usr/bin/ruby -rdate -e 'Marshal.dump(DateTime.now, STDOUT)' | ruby -rdate -e 'p Marshal.load(STDIN)'
-e:1:in load': class DateTime needs to have method _load' (TypeError)
from -e:1:in `'
bash: exit 1

Patch attached.
=end


Files

0001-compatible-marshal-loader.patch (2.3 KB) 0001-compatible-marshal-loader.patch nobu (Nobuyoshi Nakada), 06/27/2012 02:23 AM

Updated by nobu (Nobuyoshi Nakada) almost 12 years ago

  • Description updated (diff)

Updated by tadf (tadayoshi funaba) almost 12 years ago

  • Status changed from Assigned to Closed

already accepts if rational also accept

Actions

Also available in: Atom PDF

Like0
Like0Like0