aboutsummaryrefslogtreecommitdiffstats
path: root/variable.c
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-14 21:57:33 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-14 21:57:33 +0000
commit811e9923cf99350fc351b89fc944547114e7b70b (patch)
tree4791e0e805815250a0a3690a79f2c59bfa5afb9d /variable.c
parentace442901453e2c963fc3f210faaa237bfbafc1a (diff)
downloadruby-811e9923cf99350fc351b89fc944547114e7b70b.tar.gz
* variable.c: Change autoload to call `require` through Ruby rather
than directly calling `rb_require_safe`. This allows things like RubyGems to intercept file loading done though `autoload`. [Feature #11140] * test/ruby/test_autoload.rb: Test for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/variable.c b/variable.c
index c835350a4c..9b5a326492 100644
--- a/variable.c
+++ b/variable.c
@@ -1803,7 +1803,7 @@ static VALUE
autoload_require(VALUE arg)
{
struct autoload_data_i *ele = (struct autoload_data_i *)arg;
- return rb_require_safe(ele->feature, ele->safe_level);
+ return rb_funcall(rb_vm_top_self(), rb_intern("require"), 1, ele->feature);
}
static VALUE