1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

merge revision(s) 62094,62584: [Backport #14407]

Merge ruby/spec@fd56cd4



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@62586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2018-02-26 08:43:44 +00:00
parent b043343c6c
commit e5dd44657b

View file

@ -766,8 +766,16 @@ describe "The defined? keyword for a scoped constant" do
defined?(DefinedSpecs::String).should be_nil
end
it "returns nil when a constant is defined on top-level but not on the class" do
defined?(DefinedSpecs::Basic::String).should be_nil
ruby_version_is ""..."2.5" do
it "returns 'constant' when a constant is defined on top-level but not on the class" do
defined?(DefinedSpecs::Basic::String).should == 'constant'
end
end
ruby_version_is "2.5" do
it "returns nil when a constant is defined on top-level but not on the class" do
defined?(DefinedSpecs::Basic::String).should be_nil
end
end
it "returns 'constant' if the scoped-scoped constant is defined" do