aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-05-08 15:13:33 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-05-08 15:13:34 +0900
commita7cbb659566b4b9114cc2a00f036e7a88300b30d (patch)
treee0760fdb7af7129036bc1fcf88e84c9f376502c4 /spec/ruby/core
parent229e5053a1ea9633489e296faafc34c9c51e7391 (diff)
downloadruby-a7cbb659566b4b9114cc2a00f036e7a88300b30d.tar.gz
Do not break rubyspec for old Ruby
Fixing 7d805e67f3275aef066d77aa9c32bef715c362ed
Diffstat (limited to 'spec/ruby/core')
-rw-r--r--spec/ruby/core/module/autoload_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/ruby/core/module/autoload_spec.rb b/spec/ruby/core/module/autoload_spec.rb
index 11d09cea22..f3066de586 100644
--- a/spec/ruby/core/module/autoload_spec.rb
+++ b/spec/ruby/core/module/autoload_spec.rb
@@ -449,7 +449,9 @@ 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
+ ruby_version_is "2.7" do
+ ModuleSpecs::Autoload.const_defined?("P").should be_true
+ end
end
it "loads the file when opening a module that is the autoloaded constant" do