Project

General

Profile

Actions

Bug #2237

closed

Interoperability between 1.8 and 1.9 through Marshal

Added by yugui (Yuki Sonoda) about 15 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2dev (2009-09-29 trunk 25144) [i386-darwin9.8.0]
Backport:
[ruby-dev:39515]

Description

=begin
当たり前といえばそうなんですが、ruby 1.9で拡張されたMarshalフォーマットをRuby 1.8が認識しません。
将来的に何か手立てを考えたいです。Marshalのバージョンアップに後から追随するためのものを配布するなり何なりの方策はないでしょうか。

% ruby-trunk -v
ruby 1.9.2dev (2009-09-29 trunk 25144) [i386-darwin9.8.0]
% ruby18 -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9]
% ruby-trunk -e 'print Marshal.dump([:あ]*3)' | ruby18 -e 'p Marshal.load($<.read)'
[:"\343\201\202", :E, :E]
% ruby-trunk -e 'print Marshal.dump(["あ"]*3)' | ruby-trunk -e 'p Marshal.load($<.read)'
["あ", "あ", "あ"]
=end

Actions #1

Updated by naruse (Yui NARUSE) about 15 years ago

=begin
2つ目の例が読み込みもtrunkになっています。
本質的ではないし結果もほぼ同じなので関係ありませんが。

で、これって1.9のSymbolをMarshal.dumpする際のバグなんじゃないですかね。
=end

Actions #2

Updated by nobu (Nobuyoshi Nakada) about 15 years ago

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

=begin
This issue was solved with changeset r25411.
Yuki, thank you for your reporting of the issue.
You have greatfully contributed toward Ruby.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0