diff options
Diffstat (limited to 'spec/ruby/core/module/const_set_spec.rb')
-rw-r--r-- | spec/ruby/core/module/const_set_spec.rb | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/spec/ruby/core/module/const_set_spec.rb b/spec/ruby/core/module/const_set_spec.rb index ba7810d17b..5bdfd7b68f 100644 --- a/spec/ruby/core/module/const_set_spec.rb +++ b/spec/ruby/core/module/const_set_spec.rb @@ -20,20 +20,10 @@ describe "Module#const_set" do m.name.should == "ConstantSpecs::CS_CONST1000" end - ruby_version_is ""..."3.0" do - it "does not set the name of a module scoped by an anonymous module" do - a, b = Module.new, Module.new - a.const_set :B, b - b.name.should be_nil - end - end - - ruby_version_is "3.0" do - it "sets the name of a module scoped by an anonymous module" do - a, b = Module.new, Module.new - a.const_set :B, b - b.name.should.end_with? '::B' - end + it "sets the name of a module scoped by an anonymous module" do + a, b = Module.new, Module.new + a.const_set :B, b + b.name.should.end_with? '::B' end it "sets the name of contained modules when assigning a toplevel anonymous module" do |