summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-15 11:57:24 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-15 11:57:24 +0000
commitd6ff3cfb18c63c16feaac084390711c8b62695c1 (patch)
tree89ca17dffec96e44819d784f5f17d5b779ecdccb /marshal.c
parent245f33717bbcf81a73d837201e13c95f93e1a904 (diff)
merges r24086,r24087 and r24095 from trunk into ruby_1_9_1.
-- * marshal.c (r_object0): copy instance variables to new regexp. -- * marshal.c (r_object0): should not shadow outer variable not to return Qnil always. -- * marshal.c (r_object0): should return real object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/marshal.c b/marshal.c
index 860b23f11b..5f0f14082d 100644
--- a/marshal.c
+++ b/marshal.c
@@ -1371,7 +1371,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);
+ v = rb_reg_new("", 0, options);
if (ivp) {
r_ivar(v, arg);
*ivp = Qfalse;
@@ -1382,8 +1382,9 @@ 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);
- v = r_leave(v, arg);
+ str = r_entry(rb_reg_new_str(str, options), arg);
+ rb_copy_generic_ivar(str, v);
+ v = r_leave(str, arg);
}
break;