mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@6f38a82
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b864bd05bf
commit
4fbb9aa3cb
145 changed files with 2847 additions and 2596 deletions
|
@ -404,24 +404,22 @@ describe "Constant resolution within a singleton class (class << obj)" do
|
|||
ConstantSpecs::CS_SINGLETON1.foo.should == 1
|
||||
end
|
||||
|
||||
ruby_version_is "2.3" do
|
||||
it "uses its own namespace for each object" do
|
||||
a = ConstantSpecs::CS_SINGLETON2[0].foo
|
||||
b = ConstantSpecs::CS_SINGLETON2[1].foo
|
||||
[a, b].should == [1, 2]
|
||||
end
|
||||
it "uses its own namespace for each object" do
|
||||
a = ConstantSpecs::CS_SINGLETON2[0].foo
|
||||
b = ConstantSpecs::CS_SINGLETON2[1].foo
|
||||
[a, b].should == [1, 2]
|
||||
end
|
||||
|
||||
it "uses its own namespace for nested modules" do
|
||||
a = ConstantSpecs::CS_SINGLETON3[0].x
|
||||
b = ConstantSpecs::CS_SINGLETON3[1].x
|
||||
a.should_not equal(b)
|
||||
end
|
||||
it "uses its own namespace for nested modules" do
|
||||
a = ConstantSpecs::CS_SINGLETON3[0].x
|
||||
b = ConstantSpecs::CS_SINGLETON3[1].x
|
||||
a.should_not equal(b)
|
||||
end
|
||||
|
||||
it "allows nested modules to have proper resolution" do
|
||||
a = ConstantSpecs::CS_SINGLETON4_CLASSES[0].new
|
||||
b = ConstantSpecs::CS_SINGLETON4_CLASSES[1].new
|
||||
[a.foo, b.foo].should == [1, 2]
|
||||
end
|
||||
it "allows nested modules to have proper resolution" do
|
||||
a = ConstantSpecs::CS_SINGLETON4_CLASSES[0].new
|
||||
b = ConstantSpecs::CS_SINGLETON4_CLASSES[1].new
|
||||
[a.foo, b.foo].should == [1, 2]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue