[macruby-changes] [1143] MacRuby/branches/experimental/spec/frozen/language/defined_spec.rb
source_changes at macosforge.org
source_changes at macosforge.org
Tue Mar 24 19:36:58 PDT 2009
Revision: 1143
http://trac.macosforge.org/projects/ruby/changeset/1143
Author: lsansonetti at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090324/289ab81d/attachment.html>
More information about the macruby-changes
mailing list