diff options
Diffstat (limited to 'spec/ruby/language/module_spec.rb')
-rw-r--r-- | spec/ruby/language/module_spec.rb | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/spec/ruby/language/module_spec.rb b/spec/ruby/language/module_spec.rb index e361bf58f5..fffcf9c90d 100644 --- a/spec/ruby/language/module_spec.rb +++ b/spec/ruby/language/module_spec.rb @@ -78,20 +78,10 @@ describe "Assigning an anonymous module to a constant" do mod.name.should == "ModuleSpecs_CS1" 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::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::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::B = b + b.name.should.end_with? '::B' end it "sets the name of contained modules when assigning a toplevel anonymous module" do |