Modified: MacRuby/branches/experimental/spec/frozen/language/defined_spec.rb (1142 => 1143)
--- 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