1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* marshal.c (w_object): preserve extended module on struct.

(ruby-bugs-ja:PR#422)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2003-04-09 05:08:25 +00:00
parent f92f8b565f
commit db24e481b3
2 changed files with 25 additions and 22 deletions

View file

@ -1,3 +1,8 @@
Wed Apr 9 14:05:00 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* marshal.c (w_object): preserve extended module on struct.
(ruby-bugs-ja:PR#422)
Tue Apr 8 17:13:53 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* random.c (rb_f_rand): normalize bignum argument.
@ -52,7 +57,7 @@ Fri Apr 4 10:53:22 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (assign): should prepare mrhs by svalue_to_mrhs().
Wed Apr 02 15:11:23 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
Wed Apr 2 15:11:23 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* README.EXT, README.EXT.ja (3.3): clarified -1 as free for
Data_Wrap_Struct(). [ruby-dev:19881]
@ -375,7 +380,7 @@ Sun Mar 9 17:09:40 2003 WATANABE Hirofumi <eban@ruby-lang.org>
* Makefile.in (fake.rb): set ALT_SEPARATOR to the default value.
Sat Mar 08 11:30:59 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
Sat Mar 8 11:30:59 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* eval.c (massign): fix a bug not to expand in assignment to sole
lhs. [ruby-dev:19766]
@ -434,7 +439,7 @@ Wed Mar 5 05:55:20 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c (rb_str_cat): remove ptr NULL check and MEMZERO(). ptr
must be non NULL.
Tue Mar 04 23:12:07 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
Tue Mar 4 23:12:07 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* configure.in, bcc32/Makefile.sub, win32/Makefile.sub: define
RUBY_EXPORT to export symbols.
@ -509,7 +514,7 @@ Mon Mar 3 02:53:52 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* io.c (rb_io_fread): should not clearerr() if there's no filled
buffer (i.e. rb_io_fread() returning zero).
Mon Mar 03 01:42:35 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
Mon Mar 3 01:42:35 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* misc/ruby-mode.el (ruby-expr-beg): escaped char syntax.
@ -829,14 +834,14 @@ Mon Feb 10 03:33:42 2003 WATANABE Hirofumi <eban@ruby-lang.org>
* io.c (rb_file_sysopen): rb_file_sysopen_internal() needs four
arguments.
Sun Feb 09 15:16:04 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
Sun Feb 9 15:16:04 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* intern.h (HAVE_RB_DEFINE_ALLOC_FUNC, RB_CVAR_SET_4ARGS):
define to 1.
* ruby.h (NORETURN_STYLE_NEW): ditto.
Sun Feb 09 12:28:18 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
Sun Feb 9 12:28:18 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* lib/mkmf.rb (init_mkmf): add libdir to LIBPATH unless cross
compiling.

View file

@ -505,13 +505,12 @@ w_object(obj, arg, limit)
break;
case T_STRUCT:
w_byte(TYPE_STRUCT, arg);
w_class(TYPE_STRUCT, obj, arg);
{
long len = RSTRUCT(obj)->len;
VALUE mem;
long i;
w_unique(rb_obj_classname(obj), arg);
w_long(len, arg);
mem = rb_struct_iv_get(rb_obj_class(obj), "__member__");
if (mem == Qnil) {
@ -529,20 +528,20 @@ w_object(obj, arg, limit)
w_ivar(ROBJECT(obj)->iv_tbl, &c_arg);
break;
case T_DATA:
{
VALUE v;
case T_DATA:
{
VALUE v;
w_class(TYPE_DATA, obj, arg);
if (!rb_respond_to(obj, s_dump_data)) {
rb_raise(rb_eTypeError,
"class %s needs to have instance method `_dump_data'",
rb_obj_classname(obj));
}
v = rb_funcall(obj, s_dump_data, 0);
w_object(v, arg, limit);
}
break;
w_class(TYPE_DATA, obj, arg);
if (!rb_respond_to(obj, s_dump_data)) {
rb_raise(rb_eTypeError,
"class %s needs to have instance method `_dump_data'",
rb_obj_classname(obj));
}
v = rb_funcall(obj, s_dump_data, 0);
w_object(v, arg, limit);
}
break;
default:
rb_raise(rb_eTypeError, "can't dump %s",
@ -1185,7 +1184,6 @@ marshal_load(argc, argv)
VALUE port, proc;
int major, minor;
VALUE v;
OpenFile *fptr;
struct load_arg arg;
volatile VALUE hash; /* protect from GC */