diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-17 09:36:05 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-17 09:36:05 +0000 |
commit | 73a47246f27d7967ec8af5fb7ce43064d4a64d40 (patch) | |
tree | d3f505227c0ff960dce425a24c1722e6e29d5ef8 | |
parent | 50cc115b7e29418bf8cc1713717e72912f45e74a (diff) |
* eval.c (rb_mod_nesting): load wrapping module should appear in
Module#nesting list. (ruby-bugs-ja:PR#328)
* eval.c (rb_thread_remove): free stack buffer on remove.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | eval.c | 5 | ||||
-rw-r--r-- | marshal.c | 14 | ||||
-rw-r--r-- | variable.c | 1 |
4 files changed, 20 insertions, 7 deletions
@@ -1,3 +1,10 @@ +Tue Sep 17 01:13:31 2002 Yukihiro Matsumoto <matz@ruby-lang.org> + + * eval.c (rb_mod_nesting): load wrapping module should appear in + Module#nesting list. (ruby-bugs-ja:PR#328) + + * eval.c (rb_thread_remove): free stack buffer on remove. + Tue Sep 17 00:58:35 2002 Minero Aoki <aamine@loveruby.net> * io.c: add parameter prototype. @@ -1570,6 +1570,9 @@ rb_mod_nesting() if (!NIL_P(cbase->nd_clss)) rb_ary_push(ary, cbase->nd_clss); cbase = cbase->nd_next; } + if (ruby_wrapper && RARRAY(ary)->len == 0) { + rb_ary_push(ary, ruby_wrapper); + } return ary; } @@ -7766,6 +7769,8 @@ rb_thread_remove(th) th->gid = 0; th->prev->next = th->next; th->next->prev = th->prev; + if (th->stk_ptr) free(th->stk_ptr); + th->stk_ptr = 0; } static int @@ -43,7 +43,7 @@ shortlen(len, ds) #endif #define MARSHAL_MAJOR 4 -#define MARSHAL_MINOR 7 +#define MARSHAL_MINOR 8 #define TYPE_NIL '0' #define TYPE_TRUE 'T' @@ -371,24 +371,24 @@ w_object(obj, arg, limit) if (OBJ_TAINTED(obj)) arg->taint = Qtrue; + if (ivtbl = rb_generic_ivar_table(obj)) { + w_byte(TYPE_IVAR, arg); + } + st_add_direct(arg->data, obj, arg->data->num_entries); if (rb_respond_to(obj, s_dump)) { VALUE v; - w_byte(TYPE_USERDEF, arg); - w_unique(rb_class2name(CLASS_OF(obj)), arg); + w_class(TYPE_USERDEF, obj, arg); v = rb_funcall(obj, s_dump, 1, INT2NUM(limit)); if (TYPE(v) != T_STRING) { rb_raise(rb_eTypeError, "_dump() must return String"); } w_bytes(RSTRING(v)->ptr, RSTRING(v)->len, arg); + if (ivtbl) w_ivar(ivtbl, &c_arg); return; } - if (ivtbl = rb_generic_ivar_table(obj)) { - w_byte(TYPE_IVAR, arg); - } - switch (BUILTIN_TYPE(obj)) { case T_CLASS: if (FL_TEST(obj, FL_SINGLETON)) { diff --git a/variable.c b/variable.c index 18cd0c14ee..255854d8f0 100644 --- a/variable.c +++ b/variable.c @@ -1458,6 +1458,7 @@ original_module(c) static void cvar_override_check(id, a) + ID id; VALUE a; { VALUE base = original_module(a); |