[macruby-changes] [1284] MacRuby/branches/experimental/test_roxor.rb
source_changes at macosforge.org
source_changes at macosforge.org
Tue Mar 31 21:45:07 PDT 2009
Revision: 1284
http://trac.macosforge.org/projects/ruby/changeset/1284
Author: lsansonetti at apple.com
Date: 2009-03-31 21:45:06 -0700 (Tue, 31 Mar 2009)
Log Message:
-----------
adding more failing tests
Modified Paths:
--------------
MacRuby/branches/experimental/test_roxor.rb
Modified: MacRuby/branches/experimental/test_roxor.rb
===================================================================
--- MacRuby/branches/experimental/test_roxor.rb 2009-03-31 21:01:08 UTC (rev 1283)
+++ MacRuby/branches/experimental/test_roxor.rb 2009-04-01 04:45:06 UTC (rev 1284)
@@ -1065,7 +1065,14 @@
assert '42', "x=42; 1.times { 1.times { 1.times { p x } } }"
assert '42', "def f; 1.times { yield 42 }; end; f {|x| p x}"
+
assert '42', "def foo; x = 42; proc { x }; end; p foo.call"
+ assert '42', %q{
+ def foo() x=1; [proc { x }, proc {|z| x = z}]; end
+ a, b = foo
+ b.call(42)
+ p a.call
+ }
end
@@ -1304,6 +1311,11 @@
p foo
}
+ assert '42', %q{
+ def foo; x = 42; proc {}; end
+ p = foo; eval('p x', p.binding)
+ }
+
assert "42", %q{
class Foo;
def foo; 42; end;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090331/4f932301/attachment.html>
More information about the macruby-changes
mailing list