diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-04 07:23:20 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-04 07:23:20 +0000 |
commit | 2974b00f1713156528db1d482cf247c1c37c7ceb (patch) | |
tree | 057a76a1b72cf701fd18ddc59cffff0fa29c6b9e /variable.c | |
parent | d3842de5c9baa2962e01d02b2499eac49d9065a6 (diff) | |
download | ruby-2974b00f1713156528db1d482cf247c1c37c7ceb.tar.gz |
marshal.c: GC guard
* marshal.c (w_object, marshal_dump, r_object0, marshal_load): use
RB_GC_GUARD() (directly or indirectly) instead of volatile.
* variable.c (rb_path_to_class): prevent the arguemnt from GC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/variable.c b/variable.c index ebe532f28a..6bd447b46c 100644 --- a/variable.c +++ b/variable.c @@ -354,6 +354,7 @@ rb_path_to_class(VALUE pathname) rb_raise(rb_eTypeError, "%s does not refer to class/module", path); } } + RB_GC_GUARD(pathname); return c; } |