diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-03 16:19:40 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-03 16:19:40 +0000 |
commit | b53cf149ad8d7c46572e4567ca949b4f82ebb22c (patch) | |
tree | ee5032bcb38573dade8ba2c46acbcc0d5f3ddfe3 /spec/ruby/language/constants_spec.rb | |
parent | aeeaadaad08038217440c1e9e7c5ca126d7dc633 (diff) |
Update to ruby/spec@9be7c7e
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/language/constants_spec.rb')
-rw-r--r-- | spec/ruby/language/constants_spec.rb | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/spec/ruby/language/constants_spec.rb b/spec/ruby/language/constants_spec.rb index 49ff8844af..5b111f4e81 100644 --- a/spec/ruby/language/constants_spec.rb +++ b/spec/ruby/language/constants_spec.rb @@ -458,16 +458,17 @@ describe "Module#private_constant marked constants" do lambda {mod::Foo}.should raise_error(NameError) end - it "sends #const_missing to the original class or module" do - mod = Module.new - mod.const_set :Foo, true - mod.send :private_constant, :Foo - def mod.const_missing(name) - @const_missing_arg = name - name == :Foo ? name : super - end + ruby_version_is "2.6" do + it "sends #const_missing to the original class or module" do + mod = Module.new + mod.const_set :Foo, true + mod.send :private_constant, :Foo + def mod.const_missing(name) + name == :Foo ? name : super + end - mod::Foo.should == :Foo + mod::Foo.should == :Foo + end end describe "in a module" do |