diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-12-09 12:25:34 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-12-09 12:25:34 +0000 |
commit | 00f4c13e22967de1d7e42085b2fc32bf6718f580 (patch) | |
tree | a35a45552ac3ea44b05036cca669ca18ed31e281 /spec | |
parent | 15eba4ed0ebb4e019a037b0af10b34fdbc85e03a (diff) |
merge revision(s) 7d805e67f3275aef066d77aa9c32bef715c362ed: [Backport #15780]
Avoid triggering autoload in Module#const_defined?(String)
[Bug #15780]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/core/module/autoload_spec.rb | 1 |
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 d6af169cff..ba8132100b 100644 --- a/spec/ruby/core/module/autoload_spec.rb +++ b/spec/ruby/core/module/autoload_spec.rb @@ -409,6 +409,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 |