ruby-changes:50459
From: naruse <ko1@a...>
Date: Mon, 26 Feb 2018 17:43:55 +0900 (JST)
Subject: [ruby-changes:50459] naruse:r62586 (ruby_2_5): merge revision(s) 62094, 62584: [Backport #14407]
naruse 2018-02-26 17:43:44 +0900 (Mon, 26 Feb 2018) New Revision: 62586 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62586 Log: merge revision(s) 62094,62584: [Backport #14407] Merge ruby/spec@fd56cd4 Modified files: branches/ruby_2_5/spec/ruby/language/defined_spec.rb Index: ruby_2_5/spec/ruby/language/defined_spec.rb =================================================================== --- ruby_2_5/spec/ruby/language/defined_spec.rb (revision 62585) +++ ruby_2_5/spec/ruby/language/defined_spec.rb (revision 62586) @@ -766,8 +766,16 @@ describe "The defined? keyword for a sco https://github.com/ruby/ruby/blob/trunk/ruby_2_5/spec/ruby/language/defined_spec.rb#L766 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/