Revision: 1143 http://trac.macosforge.org/projects/ruby/changeset/1143 Author: lsansonetti@apple.com Date: 2009-03-24 19:36:57 -0700 (Tue, 24 Mar 2009) Log Message: ----------- broke a test into 2 tests, one for all versions before 1.9 and one for 1.9 (eloy: feel free to correct this if necessary :)) Modified Paths: -------------- MacRuby/branches/experimental/spec/frozen/language/defined_spec.rb Modified: MacRuby/branches/experimental/spec/frozen/language/defined_spec.rb =================================================================== --- MacRuby/branches/experimental/spec/frozen/language/defined_spec.rb 2009-03-25 02:35:34 UTC (rev 1142) +++ MacRuby/branches/experimental/spec/frozen/language/defined_spec.rb 2009-03-25 02:36:57 UTC (rev 1143) @@ -175,11 +175,21 @@ ret.should == "super" end - it "returns 'local-variable' when defined? is called on a block var" do - block = Proc.new { |xxx| defined?(xxx) } - ret = block.call(1) - ret.should == 'local-variable(in-block)' + ruby_version_is "" ... "1.8" do + it "returns 'local-variable' when defined? is called on a block var" do + block = Proc.new { |xxx| defined?(xxx) } + ret = block.call(1) + ret.should == 'local-variable(in-block)' + end end + + ruby_version_is "1.9" do + it "returns 'local-variable' when defined? is called on a block var" do + block = Proc.new { |xxx| defined?(xxx) } + ret = block.call(1) + ret.should == 'local-variable' + end + end end it "returns nil for an instance variable not yet accessed" do
participants (1)
-
source_changes@macosforge.org