diff --git a/ChangeLog b/ChangeLog index b40e7e135e..e66bb7de19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Jul 13 19:41:05 2009 NARUSE, Yui + + * marshal.c (r_object0): copy instance variables to new regexp. + Mon Jul 13 17:49:11 2009 Koichi Sasada * vm_core.h, compile.c: declare struct iseq_inline_cache_entry. diff --git a/marshal.c b/marshal.c index e7c0c4b642..4955fff20d 100644 --- a/marshal.c +++ b/marshal.c @@ -1393,7 +1393,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod) { volatile VALUE str = r_bytes(arg); int options = r_byte(arg); - v = r_entry(rb_reg_new("", 0, options), arg); + VALUE v = rb_reg_new("", 0, options); if (ivp) { r_ivar(v, arg); *ivp = Qfalse; @@ -1404,7 +1404,8 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod) #define f_gsub_bang(x,y,z) rb_funcall(x, rb_intern("gsub!"), 2, y, z) f_gsub_bang(str, rb_reg_new("\\\\u", 3, 0), rb_usascii_str_new_cstr("u")); } - v = r_entry(rb_reg_new_str(str, options), arg); + str = r_entry(rb_reg_new_str(str, options), arg); + rb_copy_generic_ivar(str, v); v = r_leave(v, arg); } break;