# Marshal.dumpにおけるインスタンス変数の取り扱いについて

\$B\$1\$\$\$8\$e!w\$\$\$7\$D\$+\$G\$9(B.

nil, true, Symbol, Fixnum, Class, Module
\$B\$G%\$%s%9%?%s%9JQ?t\$,Dj5A\$5\$l(B
\$B\$F\$\$\$F\$b(B, Marshal.dump \$B\$G\$O(B,
\$B\$=\$N>pJs\$,%@%s%W\$5\$l\$J\$\$\$h\$&\$G\$9(B.

\$B\$^\$?(B, Bignum, Float\$B\$O%\$%s%9%?%s%9JQ?t\$r%@%s%W\$7\$F\$\$\$k\$s\$G\$9\$h\$M(B.

\$B\$3\$l\$O(B, \$B;EMM\$J\$s\$G\$7\$g\$&\$+(B?
\$B\$3\$&\$J\$C\$F\$\$\$kM}M3\$,%\$%^%\$%AM}2r\$G\$-\$J\$\$46(B
\$B\$8\$J\$s\$G\$9\$h\$M\$’(B.

__
---------------------------------------------------->> [email protected](B \$B7=<y(B
<<—
---------------------------------->> e-mail: [email protected] <<—

\$B\$^\$D\$b\$H(B \$B\$f\$-\$R\$m\$G\$9(B

In message “Re: [ruby-dev:45372]
Marshal.dump\$B\$K\$*\$1\$k%\$%s%9%?%s%9JQ?t\$N<h\$j07\$\$\$K\$D\$\$\$F(B”
on Fri, 16 Mar 2012 21:58:23 +0900, [email protected] (Keiju
ISHITSUKA) writes:

|nil, true, Symbol, Fixnum, Class, Module \$B\$G%\$%s%9%?%s%9JQ?t\$,Dj5A\$5\$l(B
|\$B\$F\$\$\$F\$b(B, Marshal.dump \$B\$G\$O(B, \$B\$=\$N>pJs\$,%@%s%W\$5\$l\$J\$\$\$h\$&\$G\$9(B.
|
|\$B\$^\$?(B, Bignum, Float\$B\$O%\$%s%9%?%s%9JQ?t\$r%@%s%W\$7\$F\$\$\$k\$s\$G\$9\$h\$M(B.
|
|\$B\$3\$l\$O(B, \$B;EMM\$J\$s\$G\$7\$g\$&\$+(B?
\$B\$3\$&\$J\$C\$F\$\$\$kM}M3\$,%\$%^%\$%AM}2r\$G\$-\$J\$\$46(B
|\$B\$8\$J\$s\$G\$9\$h\$M\$’(B.

Class\$B\$H([email protected]}\$NF1L>\$b\$N\$r;H\$&!W\$N\$G!"<j85\$G%\$%s%9%?%s(B
\$B%9JQ?t\$,\$"\$m\$&\$HL5;k\$7\$^\$9!#\$\$\$:\$l\$K\$7\$F\$b\$3\$A\$i\$NDj5A\$r;}\$C(B
\$B\$F\$\$\$/\$3\$H\$O\$G\$-\$J\$\$\$N\$G!#(B

nil, true, symbol, fixnum\$B\$O(Bimmediate\$B\$J\$N\$G%\$%s%9%?%s%9JQ?t\$r(B
\$B;}\$AJb\$-\$?\$/\$J\$\$(B(\$B%\$%s%9%?%s%9JQ?t\$rDI2C\$7\$A\$c\$&\$H!"%0%m!<%P%k(B
\$B\$K1F6A\$rM?\$(\$F\$7\$^\$&(B)\$B\$H\$\$\$&\$N\$,\$=\$NM}M3\$G\$9!#(BClass\$B\$d(BModule\$B\$H(B
\$B0c\$C\$F!"\$=\$&\$G\$"\$C\$F\$O\$\$\$1\$J\$\$\$H\$\$\$&\$o\$1\$G\$O\$J\$\$\$N\$G\$9\$,!“F3(B
\$BF~\$K\$O?5=E\$G\$”\$j\$?\$\$\$G\$9!#\$"\$H!"\$`\$7\$m(BNumeric\$B\$N%5%V%/%i%9\$G\$"(B
\$B\$k(BBignum\$B\$H(BFloat\$B\$G%\$%s%9%?%s%9JQ?t\$rL5;k\$9\$k\$h\$&\$K\$7\$?\$\$\$/\$i\$\$(B
\$B\$G\$9\$M!#(B

``                            \$B\$^\$D\$b\$H(B \$B\$f\$-\$R\$m(B /:|)``

\$B\$^\$D\$b\$H(B \$B\$f\$-\$R\$m\$G\$9(B

In message “Re: [ruby-dev:45377] Re:
Marshal.dump\$B\$K\$*\$1\$k%\$%s%9%?%s%9JQ?t\$N<h\$j07\$\$\$K\$D\$\$\$F(B”
on Sat, 17 Mar 2012 15:06:10 +0900, [email protected]
([email protected]=<y(B) writes:

|>\$B\$"\$H!"\$`\$7\$m(BNumeric\$B\$N%5%V%/%i%9\$G\$"\$k(BBignum\$B\$H(BFloat\$B\$G%\$%s%9%?%s%9JQ?t(B
|>\$B\$rL5;k\$9\$k\$h\$&\$K\$7\$?\$\$\$/\$i\$\$\$G\$9\$M!#(B
|
|\$B;d\$b8e<[email protected]\$m\$&\$H;W\$C\$?\$N\$G\$9\$,(B, Bignum\$B\$H\$+(BFloat\$B\$G\$b%\$%s%9%?%s%9JQ?t\$r(B
|\$B;}\$D<BAu\$d%5%V%/%i%9\$,\$"\$C\$F\$b\$*\$+\$7\$/\$O\$J\$\$\$N\$G(B, \$B\$d\$O\$j8=9T\$,L5Fq\$J5\$(B
|\$B\$,\$7\$F\$-\$^\$7\$?(B.

\$B\$^\$"!“0JA0\$O(BComplex\$B\$H\$+DL>o\$N%*%V%8%’%/%H\$G\$7\$?\$+\$i\$M!#(B
Numeric\$B\$N2<[email protected]\$+\$i\$H\$\$\$&M}M3\$G%\$%s%9%?%s%9JQ?t\$rA4It:o\$i\$l\$?(B
\$B\$i\$=\$l\$O\$=\$l\$G:\$\$k\$G\$7\$g\$&\$,!#[email protected]!”(BT_OBJECT\$B\$G\$J\$\$(BFloat\$B\$d(B
Bignum\$B\$O\$d\$C\$Q\$jL5;k\$7\$F\$b\$\$\$\$\$h\$&\$J5\$\$,\$7\$^\$9!#(B

|\$B\$H\$3\$m\$G(B, \$B\$9\$4!<\$/:Y\$+\$\$OC\$J\$N\$G\$9\$,(B,
|
|rb_marshal_define_compat() \$B\$G(B
|
| :
| compat = ALLOC(marshal_compat_t);
| compat->newclass = Qnil;
| compat->oldclass = Qnil;
| compat->newclass = newclass;
| compat->oldclass = oldclass;
| :
|
|\$B\$H0lEY(BQnil\$B\$rBeF~\$7\$F\$\$\$k\$N\$G\$9\$,(B, \$B\$3\$l\$O\$J\$<\$G\$7\$g\$&\$+(B?

\$B\$J\$s\$G\$J\$s\$G\$7\$g\$&\$M\$(!#(Bakr\$B\$5\$s\$N(Br13413\$B\$+\$i\$=\$&\$\$?\$\$\$J\$s\$G!"(B
\$BH`\$KJ9\$\$\$F\$
\$J\$\$\$H!#(B

2012\$BG/(B3\$B7n(B18\$BF|(B0:26 Yukihiro M. [email protected]:

| :
|
|\$B\$H0lEY(BQnil\$B\$rBeF~\$7\$F\$\$\$k\$N\$G\$9\$,(B, \$B\$3\$l\$O\$J\$<\$G\$7\$g\$&\$+(B?

\$B\$J\$s\$G\$J\$s\$G\$7\$g\$&\$M\$(!#(Bakr\$B\$5\$s\$N(Br13413\$B\$+\$i\$=\$&\$\$?\$\$\$J\$s\$G!"(B
\$BH`\$KJ9\$\$\$F\$
\$J\$\$\$H!#(B

r13413 \$B\$G\$O(B rb_gc_register_address \$B\$,4V\$KF~\$C\$F\$\$\$?\$N\$G!"(B
\$B\$=\$3\$G(B GC \$B\$,5/\$-\$k\$3\$H\$X\$NBP:v\$G\$9\$M!#(B

% svn diff -c 13413 --diff-cmd diff -x ‘-u -p’

• compat = ALLOC(marshal_compat_t);
• compat->newclass = Qnil;
• compat->oldclass = Qnil;
• compat->newclass = newclass;
• compat->oldclass = oldclass;
• compat->dumper = dumper;

rb_gc_register_address \$BFb\$G\$O(B ALLOC \$B\$9\$k\$N\$G(B GC
\$B\$,5/[email protected]\$,\$"\$j!"(B
GC \$B\$,5/\$-\$?\$H\$-\$K(B compat->newclass \$B\$d(B compat->oldclass
\$B\$K%4%_\$,F~\$C\$F\$\$\$k\$H(B
\$B\$h\$m\$7\$/\$J\$+\$C\$?\$s\$8\$c\$J\$\$\$G\$7\$g\$&\$+!#(B

\$B\$1\$\$\$8\$e!w\$\$\$7\$D\$+\$G\$9(B.

In [ruby-dev:45381] the message: “[ruby-dev:45381] Re:
Marshal.dump\$B\$K(B
\$B\$*\$1\$k%\$%s%9%?%s%9JQ?t\$N<h\$j07\$\$\$K\$D\$\$\$F(B”, on Mar/18 00:26(JST)
Yukihiro M. writes:

\$B\$^\$D\$b\$H(B \$B\$f\$-\$R\$m\$G\$9(B

\$B\$^\$"!"0JA0\$O(BComplex\$B\$H\$+DL>o\$N%*%V%8%’%/%H\$G\$7\$?\$+\$i\$M!#(B
Numeric\$B\$N2<[email protected]\$+\$i\$H\$\$\$&M}M3\$G%\$%s%9%?%s%9JQ?t\$rA4It:o\$i\$l\$?(B
\$B\$i\$=\$l\$O\$=\$l\$G:\$\$k\$G\$7\$g\$&\$,!#(B

\$B\$?\$7\$+\$K(B.

[email protected]!"(BT_OBJECT\$B\$G\$J\$\$(BFloat\$B\$d(BBignum\$B\$O\$d\$C\$Q\$jL5;k\$7\$F\$b\$\$\$\$\$h\$&\$J5\$\$,\$7(B
\$B\$^\$9!#(B

\$B\$=\$&\$G\$9\$M\$’(B. \$B\$=\$l\$i\$N(B,
(C\$B%l%Y%k(B)\$B%5%V%/%i%9\$G\$O%\$%s%9%?%s%9JQ?t\$ODj5A(B
\$B\$9\$k\$J(B,
\$B\$b\$7\$/\$O\$=\$l\$J\$j\$N(Bmashal\$B%a%=%C%IDj5A\$7\$m\$C\$F5,Dj\$9\$k\$N\$O\$"\$j\$+(B
\$B\$b(B.

|rb_marshal_define_compat() \$B\$G(B
\$B\$J\$s\$G\$J\$s\$G\$7\$g\$&\$M\$(!#(Bakr\$B\$5\$s\$N(Br13413\$B\$+\$i\$=\$&\$\$?\$\$\$J\$s\$G!"(B
\$BH`\$KJ9\$\$\$F\$
\$J\$\$\$H!#(B

(\$B<!\$KB3\$-\$^\$9(B)

In [ruby-dev:45382] the message: “[ruby-dev:45382] Re:
Marshal.dump\$B\$K(B
\$B\$*\$1\$k%\$%s%9%?%s%9JQ?t\$N<h\$j07\$\$\$K\$D\$\$\$F(B”, on Mar/18 02:15(JST)
Tanaka
Akira writes:

r13413 \$B\$G\$O(B rb_gc_register_address \$B\$,4V\$KF~\$C\$F\$\$\$?\$N\$G!"(B
\$B\$=\$3\$G(B GC \$B\$,5/\$-\$k\$3\$H\$X\$NBP:v\$G\$9\$M!#(B
rb_gc_register_address \$BFb\$G\$O(B ALLOC \$B\$9\$k\$N\$G(B GC
\$B\$,5/[email protected]\$,\$"\$j!"(B
GC \$B\$,5/\$-\$?\$H\$-\$K(B compat->newclass \$B\$d(B compat->oldclass
\$B\$K%4%_\$,F~\$C\$F\$\$\$k\$H(B
\$B\$h\$m\$7\$/\$J\$+\$C\$?\$s\$8\$c\$J\$\$\$G\$7\$g\$&\$+!#(B

\$B\$J\$k\$[\$I(B, \$B\$=\$N>uBV\$J\$iM}2r\$G\$-\$^\$9(B.

\$B\$H\$\$\$&\$3\$H\$O(B, \$B\$9\$/\$J\$/\$H\$b(B,
\$B:#\$OI,MW\$J\$\$\$H\$\$\$&;v\$GNI\$\$\$s\$G\$9\$h\$M(B?

\$B\$5\$i\$K:Y\$+\$/\$J\$k\$N\$G\$9\$,(B…

marshal_compat_t \$B\$K4X\$o\$kA4\$F\$N=hM}\$G\$9\$,(B,
[email protected][email protected]\$N\$?\$a\$K\$"\$k\$N\$7\$g(B
\$B\$&\$+(B? \$B;H\$C\$F\$\$\$k\$N\$O(B, [email protected]\$1\$G\$9\$7(B
\$B\$3\$N;EAH\$\$r;H\$o\$J\$/\$F\$bBeBX\$G\$-(B,
\$B\$+\$D(B, \$B:#\$N;EAH\$
\$r;H\$&\$[\$&\$,%(%l%,%s%H\$J5\$\$,\$7\$^\$9\$,(B?

__
---------------------------------------------------->> [email protected](B \$B7=<y(B
<<—
---------------------------------->> e-mail: [email protected] <<—

2012\$BG/(B3\$B7n(B19\$BF|(B5:54 [email protected]=<y(B [email protected]:

r13413 \$B\$G\$O(B rb_gc_register_address \$B\$,4V\$KF~\$C\$F\$\$\$?\$N\$G!"(B
\$B\$=\$3\$G(B GC \$B\$,5/\$-\$k\$3\$H\$X\$NBP:v\$G\$9\$M!#(B
rb_gc_register_address \$BFb\$G\$O(B ALLOC \$B\$9\$k\$N\$G(B GC
\$B\$,5/[email protected]\$,\$"\$j!"(B

GC \$B\$,5/\$-\$?\$H\$-\$K(B compat->newclass \$B\$d(B compat->oldclass
\$B\$K%4%_\$,F~\$C\$F\$\$\$k\$H(B

\$B\$h\$m\$7\$/\$J\$+\$C\$?\$s\$8\$c\$J\$\$\$G\$7\$g\$&\$+!#(B

\$B\$J\$k\$[\$I(B, \$B\$=\$N>uBV\$J\$iM}2r\$G\$-\$^\$9(B.

\$B\$H\$\$\$&\$3\$H\$O(B, \$B\$9\$/\$J\$/\$H\$b(B, \$B:#\$OI,MW\$J\$\$\$H\$\$\$&;v\$GNI\$\$\$s\$G\$9\$h\$M(B?

\$B\$=\$&;W\$\$\$^\$9!#(B

marshal_compat_t \$B\$K4X\$o\$kA4\$F\$N=hM}\$G\$9\$,(B, [email protected][email protected]\$N\$?\$a\$K\$"\$k\$N\$7\$g(B
\$B\$&\$+(B? \$B;H\$C\$F\$\$\$k\$N\$O(B, [email protected]\$1\$G\$9\$7(B
\$B\$3\$N;EAH\$\$r;H\$o\$J\$/\$F\$bBeBX\$G\$-(B,
\$B\$+\$D(B, \$B:#\$N;EAH\$
\$r;H\$&\$[\$&\$,%(%l%,%s%H\$J5\$\$,\$7\$^\$9\$,(B?

\$B:#\$N;EAH\$_\$H\$\$\$&\$N\$,2?\$r;X\$7\$F\$\$\$k\$N\$+\$A\$g\$C\$H\$o\$+\$i\$J\$\$\$N\$G\$9\$,!"(B
Range \$B\$r(B T_OBJECT \$B\$KLa\$;\$PLdBj\$J\$\$\$H;W\$\$\$^\$9!#(B

\$B\$1\$\$\$8\$e!w\$\$\$7\$D\$+\$G\$9(B.

In [ruby-dev:45376] the message: “[ruby-dev:45376] Re:
Marshal.dump\$B\$K(B
\$B\$*\$1\$k%\$%s%9%?%s%9JQ?t\$N<h\$j07\$\$\$K\$D\$\$\$F(B”, on Mar/17 10:27(JST)
Yukihiro M. writes:

\$B\$^\$D\$b\$H(B \$B\$f\$-\$R\$m\$G\$9(B

Class\$B\$H([email protected]}\$NF1L>\$b\$N\$r;H\$&!W\$N\$G!"<j85\$G%\$%s%9%?%s(B
\$B%9JQ?t\$,\$"\$m\$&\$HL5;k\$7\$^\$9!#\$\$\$:\$l\$K\$7\$F\$b\$3\$A\$i\$NDj5A\$r;}\$C(B
\$B\$F\$\$\$/\$3\$H\$O\$G\$-\$J\$\$\$N\$G!#(B

\$B\$=\$l\$O\$=\$&\$G\$9\$M(B.
\$BF1L>\$N%\$%s%9%?%s%9JQ?t\$,@hJ}\$K\$"\$C\$?>l9g\$J\$s\$+\$b\$I\$&(B
\$B\$9\$k\$+G:\$_\$^\$9\$7\$M(B.

nil, true, symbol, fixnum\$B\$O(Bimmediate\$B\$J\$N\$G%\$%s%9%?%s%9JQ?t\$r(B
\$B;}\$AJb\$-\$?\$/\$J\$\$(B(\$B%\$%s%9%?%s%9JQ?t\$rDI2C\$7\$A\$c\$&\$H!"%0%m!<%P%k(B
\$B\$K1F6A\$rM?\$(\$F\$7\$^\$&(B)\$B\$H\$\$\$&\$N\$,\$=\$NM}M3\$G\$9!#(BClass\$B\$d(BModule\$B\$H(B
\$B0c\$C\$F!"\$=\$&\$G\$"\$C\$F\$O\$\$\$1\$J\$\$\$H\$\$\$&\$o\$1\$G\$O\$J\$\$\$N\$G\$9\$,!“F3(B
\$BF~\$K\$O?5=E\$G\$”\$j\$?\$\$\$G\$9!#(B

\$B>e5-\$N\$h\$&\$JLdBj\$b\$"\$j\$^\$9\$N\$G(B, \$B\$d\$O\$j(B,
\$B%3%T!<\$7\$J\$\$J}\$,L5Fq\$J\$-\$,\$7\$^(B
\$B\$7\$?(B.

\$B\$"\$H!"\$`\$7\$m(BNumeric\$B\$N%5%V%/%i%9\$G\$"\$k(BBignum\$B\$H(BFloat\$B\$G%\$%s%9%?%s%9JQ?t(B
\$B\$rL5;k\$9\$k\$h\$&\$K\$7\$?\$\$\$/\$i\$\$\$G\$9\$M!#(B

\$B;d\$b8e<[email protected]\$m\$&\$H;W\$C\$?\$N\$G\$9\$,(B,
Bignum\$B\$H\$+(BFloat\$B\$G\$b%\$%s%9%?%s%9JQ?t\$r(B
\$B;}\$D<BAu\$d%5%V%/%i%9\$,\$"\$C\$F\$b\$*\$+\$7\$/\$O\$J\$\$\$N\$G(B,
\$B\$d\$O\$j8=9T\$,L5Fq\$J5\$(B
\$B\$,\$7\$F\$-\$^\$7\$?(B.

\$B\$H\$3\$m\$G(B, \$B\$9\$4!<\$/:Y\$+\$\$OC\$J\$N\$G\$9\$,(B,

rb_marshal_define_compat() \$B\$G(B

``````:
compat = ALLOC(marshal_compat_t);
compat->newclass = Qnil;
compat->oldclass = Qnil;
compat->newclass = newclass;
compat->oldclass = oldclass;
:
``````

\$B\$H0lEY(BQnil\$B\$rBeF~\$7\$F\$\$\$k\$N\$G\$9\$,(B, \$B\$3\$l\$O\$J\$<\$G\$7\$g\$&\$+(B?

__
---------------------------------------------------->> [email protected](B \$B7=<y(B
<<—
---------------------------------->> e-mail: [email protected] <<—

\$B\$1\$\$\$8\$e!w\$\$\$7\$D\$+\$G\$9(B.

In [ruby-dev:45401] the message: “[ruby-dev:45401] Re:
Marshal.dump\$B\$K(B
\$B\$*\$1\$k%\$%s%9%?%s%9JQ?t\$N<h\$j07\$\$\$K\$D\$\$\$F(B”, on Mar/19 09:44(JST)
Tanaka
Akira writes:

\$B\$H\$\$\$&\$3\$H\$O(B, \$B\$9\$/\$J\$/\$H\$b(B, \$B:#\$OI,MW\$J\$\$\$H\$\$\$&;v\$GNI\$\$\$s\$G\$9\$h\$M(B?
\$B\$=\$&;W\$\$\$^\$9!#(B

\$BN;2r\$G\$9(B.

marshal_compat_t \$B\$K4X\$o\$kA4\$F\$N=hM}\$G\$9\$,(B, [email protected][email protected]\$N\$?\$a\$K\$"\$k\$N\$7\$g(B
\$B\$&\$+(B? \$B;H\$C\$F\$\$\$k\$N\$O(B, [email protected]\$1\$G\$9\$7(B
\$B\$3\$N;EAH\$_\$r;H\$o\$J\$/\$F\$bBeBX\$G\$-(B,

\$B\$+\$D(B, \$B:#\$N;EAH\$_\$r;H\$&\$[\$&\$,%(%l%,%s%H\$J5\$\$,\$7\$^\$9\$,(B?

\$B:#\$N;EAH\$_\$H\$\$\$&\$N\$,2?\$r;X\$7\$F\$\$\$k\$N\$+\$A\$g\$C\$H\$o\$+\$i\$J\$\$\$N\$G\$9\$,!"(B
Range \$B\$r(B T_OBJECT \$B\$KLa\$;\$PLdBj\$J\$\$\$H;W\$\$\$^\$9!#(B

[email protected]\$i\$:\$G\$9\$\$\$^\$;\$s(B.
\$B\$\$\$N\$G\$O(B? \$B\$H\$\$\$&0UL#\$G\$7\$?(B.

\$B\$5\$i\$K(B, \$B\$b\$&\$R\$H\$D<ALd(B:
w_object\$B\$G(B

``````:
else if (FIXNUM_P(obj)) {
``````

#if SIZEOF_LONG <= 4
w_byte(TYPE_FIXNUM, arg);
w_long(FIX2INT(obj), arg);
#else
if (RSHIFT((long)obj, 31) == 0 || RSHIFT((long)obj, 31) == -1) {
w_byte(TYPE_FIXNUM, arg);
w_long(FIX2LONG(obj), arg);
}
else {
w_object(rb_int2big(FIX2LONG(obj)), arg, limit);
}
#endif
}
:

\$B\$H\$"\$k\$N\$G\$9\$,(B,
\$B%5%\$%:\$G=hM}\$rJ,\$1\$J\$/\$F(B(\$BA0H>ItJ,[email protected]\$1(B)\$B\$bF0:n\$9\$k5\$\$,\$9(B
\$B\$k\$N\$G\$9\$,(B(w_long\$B\$N(B#ifdef\$BFb\$b:o=|(B)?

__
---------------------------------------------------->> [email protected](B \$B7=<y(B
<<—
---------------------------------->> e-mail: [email protected] <<—

\$B\$^\$D\$b\$H(B \$B\$f\$-\$R\$m\$G\$9(B

In message “Re: [ruby-dev:45399] Re:
Marshal.dump\$B\$K\$*\$1\$k%\$%s%9%?%s%9JQ?t\$N<h\$j07\$\$\$K\$D\$\$\$F(B”
on Mon, 19 Mar 2012 05:54:02 +0900, [email protected]
([email protected]=<y(B) writes:

|>[email protected]!"(BT_OBJECT\$B\$G\$J\$\$(BFloat\$B\$d(BBignum\$B\$O\$d\$C\$Q\$jL5;k\$7\$F\$b\$\$\$\$\$h\$&\$J5\$\$,\$7(B
|>\$B\$^\$9!#(B
|
|\$B\$=\$&\$G\$9\$M\$’(B. \$B\$=\$l\$i\$N(B,
(C\$B%l%Y%k(B)\$B%5%V%/%i%9\$G\$O%\$%s%9%?%s%9JQ?t\$ODj5A(B
|\$B\$9\$k\$J(B,
\$B\$b\$7\$/\$O\$=\$l\$J\$j\$N(Bmashal\$B%a%=%C%IDj5A\$7\$m\$C\$F5,Dj\$9\$k\$N\$O\$"\$j\$+(B
|\$B\$b(B.

redmine\$B\$KEPO?\$7\$F\$_\$^\$7\$g\$&\$+!#(B

\$B\$1\$\$\$8\$e!w\$\$\$7\$D\$+\$G\$9(B.

In [ruby-dev:45403] the message: “[ruby-dev:45403] Re:
Marshal.dump\$B\$K(B
\$B\$*\$1\$k%\$%s%9%?%s%9JQ?t\$N<h\$j07\$\$\$K\$D\$\$\$F(B”, on Mar/19 13:16(JST)
Yukihiro M. writes:

\$B\$^\$D\$b\$H(B \$B\$f\$-\$R\$m\$G\$9(B

redmine\$B\$KEPO?\$7\$F\$_\$^\$7\$g\$&\$+!#(B

\$B\$*\$^\$+\$;\$7\$^\$9(B.

__
---------------------------------------------------->> [email protected](B \$B7=<y(B
<<—
---------------------------------->> e-mail: [email protected] <<—

\$B\$1\$\$\$8\$e!w\$\$\$7\$D\$+\$G\$9(B.

In [ruby-dev:45407] the message: “[ruby-dev:45407] Re:
Marshal.dump\$B\$K(B
\$B\$*\$1\$k%\$%s%9%?%s%9JQ?t\$N<h\$j07\$\$\$K\$D\$\$\$F(B”, on Mar/19 18:01(JST)
Tanaka
Akira writes:

\$B\$=\$&\$7\$?>l9g!"0JA0\$N(B Ruby \$B\$K\$\$1\$k(B Range \$B%%V%8%’%/%H\$N(B marshal
\$B%U%)!<%^%C%H\$H(B
\$B0[\$J\$k\$b\$N\$K\$J\$C\$?\$j\$O\$7\$J\$\$\$G\$7\$g\$&\$+!#(B

\$B0[\$J\$C\$F\$-\$^\$9(B.

\$B\$G\$9\$N\$G(B, ``marshal_compat_t \$B\$K4X\$o\$kA4\$F\$N=hM}\$G\$9\$,(B,
[email protected][email protected]\$N\$?(B
\$B\$a\$K\$"\$k\$N\$7\$g\$&\$+(B?’’ \$B\$H\$*J9\$-\$7\$?\$+\$C\$?\$N\$G\$9(B. \$B\$\$\$^\$O(B,
Range
\$B0J30\$N%/%i%9\$G\$o\$6\$o\$6(Bmarshal_compat_t\$B\$N;EAH\$
\$r;H\$&I,MW\$O\$J\$\$\$o\$1\$G\$9(B
\$B\$h\$M(B?

\$B\$?\$H\$(\$P!"\$=\$N\$h\$&\$K\$7\$?(B Ruby \$B\$G(B marshal \$B\$7\$?(B Range
\$B%*%V%8%’%/%H\$r(B
\$B0JA0\$N(B Ruby \$B\$G(B unmarshal \$B\$9\$k\$3\$H\$O2DG=\$G\$7\$g\$&\$+!#(B

Marshal\$B\$C\$F\$=\$3\$^\$GMW5a\$5\$l\$F\$\$\$k\$s\$G\$7\$?\$C\$1(B?

\$B\$=\$&\$7\$?>l9g!"(B32bit \$B4D6-\$H(B 64bit \$B4D6-\$N(B Ruby \$B\$G(B marshal
\$B%U%)!<%^%C%H\$,(B
\$B0[\$J\$k\$b\$N\$K\$J\$C\$?\$j\$O\$7\$J\$\$\$G\$7\$g\$&\$+!#(B
\$B\$?\$H\$(\$P!"\$=\$N\$h\$&\$K\$7\$?(B 64bit Ruby \$B\$G(B marshal \$B\$7\$?(B 2**48 \$B\$r(B
32bit Ruby \$B\$G(B unmarshal \$B\$9\$k\$3\$H\$O2DG=\$G\$7\$g\$&\$+!#(B

\$B\$*!<(B. \$B\$J\$k\$[\$I(B, \$B\$=\$3\$^\$G;W\$\$\$D\$-\$^\$;\$s\$G\$7\$?(B.

marshal\$B%U%)!<%^%C%HE*[email protected]\$,\$"\$k\$H;W\$\$\$^\$9\$,(B, 32bit ruby
\$B\$G\$O(B,
r_object\$B\$G(BTYPE_FIXNUM\$B\$G\$b(Bfixnum\$B\$K\$J\$k\$H\$O8B\$i\$:(B
Bignum\$B\$K\$J\$k\$3\$H\$,\$"\$k(B
\$B\$3\$H\$,\$"\$k\$N\$G(B,
r_object\$BB&\$G\$=\$l\$J\$j\$N=hM}\$r\$7\$J\$/\$F\$O\$\$\$1\$J\$/\$J\$C\$F\$7(B
\$B\$^\$\$\$^\$9\$M(B.

__
---------------------------------------------------->> [email protected](B \$B7=<y(B
<<—
---------------------------------->> e-mail: [email protected] <<—

2012\$BG/(B3\$B7n(B19\$BF|(B20:14 [email protected]=<y(B [email protected]:

\$B\$G\$9\$N\$G(B, ``marshal_compat_t \$B\$K4X\$o\$kA4\$F\$N=hM}\$G\$9\$,(B,
[email protected][email protected]\$N\$?(B
\$B\$a\$K\$"\$k\$N\$7\$g\$&\$+(B?’’ \$B\$H\$*J9\$-\$7\$?\$+\$C\$?\$N\$G\$9(B. \$B\$\$\$^\$O(B,
\$B0J30\$N%/%i%9\$G\$o\$6\$o\$6(Bmarshal_compat_t\$B\$N;EAH\$
\$r;H\$&I,MW\$O\$J\$\$\$o\$1\$G\$9(B
\$B\$h\$M(B?

[email protected]\$,M}M3\$J\$N\$O\$=\$N\$H\$*\$j\$G\$9!#(B

Ruby 1.8 \$B\$H(B Ruby 1.9 \$B\$N4V\$G(B marshal
\$B\$7\$?%G!<%?\$r\$d\$j\$H\$j\$7\$?\$\$\$H\$\$\$C\$?(B
\$BM}M3\$,[email protected]\$N!W\$H\$\$\$\$\$-\$C\$F\$7\$^\$C\$F\$\$\$\$\$N\$+\$I\$&\$+\$O\$h\$/\$o\$+\$j\$^\$;\$s!#(B

\$B\$?\$H\$(\$P!"\$=\$N\$h\$&\$K\$7\$?(B Ruby \$B\$G(B marshal \$B\$7\$?(B Range
\$B%*%V%8%’%/%H\$r(B

\$B0JA0\$N(B Ruby \$B\$G(B unmarshal \$B\$9\$k\$3\$H\$O2DG=\$G\$7\$g\$&\$+!#(B

Marshal\$B\$C\$F\$=\$3\$^\$GMW5a\$5\$l\$F\$\$\$k\$s\$G\$7\$?\$C\$1(B?

\$BMW5a\$5\$l\$F\$\$\$k\$h\$&\$K46\$8\$F\$\$\$^\$9!#(B

\$B\$J\$*!"(BRange \$B\$r(B T_OBJECT \$B\$KLa\$9\$N\$O\$"\$j\$&\$k\$H;W\$C\$F\$\$\$^\$9!#(B

2012\$BG/(B3\$B7n(B19\$BF|(B17:49 [email protected]=<y(B [email protected]:

[email protected]\$i\$:\$G\$9\$\$\$^\$;\$s(B.
\$B\$\$\$N\$G\$O(B? \$B\$H\$\$\$&0UL#\$G\$7\$?(B.

\$B\$=\$&\$7\$?>l9g!“0JA0\$N(B Ruby \$B\$K\$\$1\$k(B Range \$B%%V%8%’%/%H\$N(B
marshal \$B%U%)!<%^%C%H\$H(B
\$B0[\$J\$k\$b\$N\$K\$J\$C\$?\$j\$O\$7\$J\$\$\$G\$7\$g\$&\$+!#(B
\$B\$?\$H\$(\$P!”\$=\$N\$h\$&\$K\$7\$?(B Ruby \$B\$G(B marshal \$B\$7\$?(B Range
\$B%*%V%8%’%/%H\$r(B
\$B0JA0\$N(B Ruby \$B\$G(B unmarshal \$B\$9\$k\$3\$H\$O2DG=\$G\$7\$g\$&\$+!#(B

``````       w_byte(TYPE_FIXNUM, arg);
``````

\$B\$k\$N\$G\$9\$,(B(w_long\$B\$N(B#ifdef\$BFb\$b:o=|(B)?
\$B\$=\$&\$7\$?>l9g!"(B32bit \$B4D6-\$H(B 64bit \$B4D6-\$N(B Ruby \$B\$G(B marshal
\$B%U%)!<%^%C%H\$,(B
\$B0[\$J\$k\$b\$N\$K\$J\$C\$?\$j\$O\$7\$J\$\$\$G\$7\$g\$&\$+!#(B
\$B\$?\$H\$(\$P!"\$=\$N\$h\$&\$K\$7\$?(B 64bit Ruby \$B\$G(B marshal \$B\$7\$?(B 2**48
\$B\$r(B
32bit Ruby \$B\$G(B unmarshal \$B\$9\$k\$3\$H\$O2DG=\$G\$7\$g\$&\$+!#(B

\$B\$1\$\$\$8\$e!w\$\$\$7\$D\$+\$G\$9(B.

In [ruby-dev:45409] the message: “[ruby-dev:45409] Re:
Marshal.dump\$B\$K(B
\$B\$*\$1\$k%\$%s%9%?%s%9JQ?t\$N<h\$j07\$\$\$K\$D\$\$\$F(B”, on Mar/19 21:25(JST)
Tanaka
Akira writes:

\$B0J30\$N%/%i%9\$G\$o\$6\$o\$6(Bmarshal_compat_t\$B\$N;EAH\$
\$r;H\$&I,MW\$O\$J\$\$\$o\$1\$G\$9(B
\$B\$h\$M(B?

[email protected]\$,M}M3\$J\$N\$O\$=\$N\$H\$*\$j\$G\$9!#(B

\$BN;2r\$7\$^\$7\$?\$G\$9(B.

Ruby 1.8 \$B\$H(B Ruby 1.9 \$B\$N4V\$G(B marshal
\$B\$7\$?%G!<%?\$r\$d\$j\$H\$j\$7\$?\$\$\$H\$\$\$C\$?(B
\$BM}M3\$,[email protected]\$N!W\$H\$\$\$\$\$-\$C\$F\$7\$^\$C\$F\$\$\$\$\$N\$+\$I\$&\$+\$O\$h\$/\$o\$+\$j\$^\$;\$s!#(B

\$B\$=\$l\$O(B, \$B\$=\$l\$O\$=\$l\$[[email protected]\$G\$O\$J\$\$\$G\$9\$7(B, \$B\$3\$^\$k;v\$K\$J\$j\$=\$&(B.

\$B\$G\$b(B, marshal\$B\$N%U%)!<%^%C%H\$,0[\$J\$C\$F\$\$\$?\$3\$H\$"\$j\$^\$;\$s\$G\$7\$?(B?
1.9\$B7OF1(B
\$B;N\$G\$9\$,(B,
\$B%U%)!<%^%C%H\$,0[\$J\$C\$F\$\$\$k\$i\$7\$/\$F%P!<%8%g%s\$r\$=\$m\$(\$?\$3\$H\$,(B
\$B\$"\$C\$?5\$\$,\$9\$k\$s\$G\$9\$1\$I(B…

Marshal\$B\$C\$F\$=\$3\$^\$GMW5a\$5\$l\$F\$\$\$k\$s\$G\$7\$?\$C\$1(B?
\$BMW5a\$5\$l\$F\$\$\$k\$h\$&\$K46\$8\$F\$\$\$^\$9!#(B

[email protected]\$J\$\$\$H\$\$\$d\$+\$b\$7\$l\$J\$\$\$G\$9\$M(B.

\$B\$J\$*!"(BRange \$B\$r(B T_OBJECT \$B\$KLa\$9\$N\$O\$"\$j\$&\$k\$H;W\$C\$F\$\$\$^\$9!#(B

\$B\$\$\$d(B. \$BJL\$K(B, \$B\$I\$&\$7\$FM_\$7\$\$\$C\$FOC\$G\$O\$J\$/(B,
\$B\$I\$&\$7\$F\$3\$&\$J\$C\$F\$\$\$k\$N\$+CN(B
[email protected]\$1\$G\$9\$N\$G(B.

\$B\$\$\$m\$\$\$m\$H65\$(\$F\$/[email protected]\$5\$j\$"\$j\$,\$H\$&\$4\$6\$\$\$^\$7\$?(B.

__
---------------------------------------------------->> [email protected](B \$B7=<y(B
<<—
---------------------------------->> e-mail: [email protected] <<—