summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2019-05-07 12:00:57 +0200
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-07 21:20:01 +0900
commit7d805e67f3275aef066d77aa9c32bef715c362ed (patch)
treea380ab7eb259a345eaa9485d28a4c71969647d3a /spec
parent6786fe44dcbb560d896bb9bb5baa9dc74677ce17 (diff)
Avoid triggering autoload in Module#const_defined?(String)
[Bug #15780]
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/core/module/autoload_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/ruby/core/module/autoload_spec.rb b/spec/ruby/core/module/autoload_spec.rb
index 918eb61764..11d09cea22 100644
--- a/spec/ruby/core/module/autoload_spec.rb
+++ b/spec/ruby/core/module/autoload_spec.rb
@@ -449,6 +449,7 @@ describe "Module#autoload" do
it "does not load the file when accessing the constants table of the module" do
ModuleSpecs::Autoload.autoload :P, @non_existent
ModuleSpecs::Autoload.const_defined?(:P).should be_true
+ ModuleSpecs::Autoload.const_defined?("P").should be_true
end
it "loads the file when opening a module that is the autoloaded constant" do