diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-24 08:28:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-24 08:28:47 +0000 |
commit | 43b5e3d7cddad91cb9fd2f583c926519ea39c90c (patch) | |
tree | 95ffd774663f93c0bcf39d2ca73d3a0295c20819 /load.c | |
parent | 4a8b0481069eb4b01d1a4da8ee5a2a4ae5aac319 (diff) |
load.c: use RB_GC_GUARD
* load.c (rb_feature_provided): use RB_GC_GUARD for fullpath after
last use of feature.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r-- | load.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -525,7 +525,7 @@ int rb_feature_provided(const char *feature, const char **loading) { const char *ext = strrchr(feature, '.'); - volatile VALUE fullpath = 0; + VALUE fullpath = 0; if (*feature == '.' && (feature[1] == '/' || strncmp(feature+1, "./", 2) == 0)) { @@ -544,6 +544,7 @@ rb_feature_provided(const char *feature, const char **loading) } if (rb_feature_p(feature, 0, TRUE, FALSE, loading)) return TRUE; + RB_GC_GUARD(fullpath); return FALSE; } |