diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-05-08 15:13:33 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-05-08 15:13:34 +0900 |
commit | a7cbb659566b4b9114cc2a00f036e7a88300b30d (patch) | |
tree | e0760fdb7af7129036bc1fcf88e84c9f376502c4 | |
parent | 229e5053a1ea9633489e296faafc34c9c51e7391 (diff) | |
download | ruby-a7cbb659566b4b9114cc2a00f036e7a88300b30d.tar.gz |
Do not break rubyspec for old Ruby
Fixing 7d805e67f3275aef066d77aa9c32bef715c362ed
-rw-r--r-- | spec/ruby/core/module/autoload_spec.rb | 4 |
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 |