[macruby-changes] [1933] MacRuby/branches/experimental/test_vm/block.rb

source_changes at macosforge.org source_changes at macosforge.org
Fri Jun 26 05:56:34 PDT 2009


Revision: 1933
          http://trac.macosforge.org/projects/ruby/changeset/1933
Author:   vincent.isambart at gmail.com
Date:     2009-06-26 05:56:34 -0700 (Fri, 26 Jun 2009)
Log Message:
-----------
added failing tests

Modified Paths:
--------------
    MacRuby/branches/experimental/test_vm/block.rb

Modified: MacRuby/branches/experimental/test_vm/block.rb
===================================================================
--- MacRuby/branches/experimental/test_vm/block.rb	2009-06-26 12:26:00 UTC (rev 1932)
+++ MacRuby/branches/experimental/test_vm/block.rb	2009-06-26 12:56:34 UTC (rev 1933)
@@ -537,3 +537,33 @@
   b = proc { |x| if x then p x else b.call(42) end }
   b.call(nil)
 }
+
+assert '42', %{
+  b = nil
+  1.times {
+    x = 42
+    b = proc { p x }
+  }
+  x = 1
+  b.call
+}
+
+assert "42\n42", %{
+  a = b = c = nil
+  1.times {
+    1.times {
+      x = 42
+      1.times {
+        1.times {
+          c = proc {
+            a = proc { p x }
+            b = proc { p x }
+          }
+        }
+        c.call
+      }
+    }
+  }
+  b.call
+  a.call
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090626/7ba505f6/attachment.html>


More information about the macruby-changes mailing list