ruby-changes:38932
From: nobu <ko1@a...>
Date: Wed, 24 Jun 2015 17:29:02 +0900 (JST)
Subject: [ruby-changes:38932] nobu:r51013 (trunk): load.c: use RB_GC_GUARD
nobu 2015-06-24 17:28:47 +0900 (Wed, 24 Jun 2015) New Revision: 51013 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51013 Log: load.c: use RB_GC_GUARD * load.c (rb_feature_provided): use RB_GC_GUARD for fullpath after last use of feature. Modified files: trunk/load.c Index: load.c =================================================================== --- load.c (revision 51012) +++ load.c (revision 51013) @@ -525,7 +525,7 @@ int https://github.com/ruby/ruby/blob/trunk/load.c#L525 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, https://github.com/ruby/ruby/blob/trunk/load.c#L544 } if (rb_feature_p(feature, 0, TRUE, FALSE, loading)) return TRUE; + RB_GC_GUARD(fullpath); return FALSE; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/