[macruby-changes] [2818] MacRuby/trunk/test_vm/eval.rb
source_changes at macosforge.org
source_changes at macosforge.org
Thu Oct 15 16:50:24 PDT 2009
Revision: 2818
http://trac.macosforge.org/projects/ruby/changeset/2818
Author: lsansonetti at apple.com
Date: 2009-10-15 16:50:21 -0700 (Thu, 15 Oct 2009)
Log Message:
-----------
added 2 tests (contributed by jazzbox at 7zz.de)
Modified Paths:
--------------
MacRuby/trunk/test_vm/eval.rb
Modified: MacRuby/trunk/test_vm/eval.rb
===================================================================
--- MacRuby/trunk/test_vm/eval.rb 2009-10-15 22:25:22 UTC (rev 2817)
+++ MacRuby/trunk/test_vm/eval.rb 2009-10-15 23:50:21 UTC (rev 2818)
@@ -118,4 +118,25 @@
rescue Exception => e
end
p e.backtrace.kind_of? Array
-}
\ No newline at end of file
+}
+
+assert 'true', %{
+ class Foo
+ def get_binding
+ binding
+ end
+ end
+ b = Foo.new.get_binding { 42 }
+ p eval "block_given?", b
+}
+
+assert '42', %{
+ class Foo
+ def get_binding
+ binding
+ end
+ end
+ b = Foo.new.get_binding { 42 }
+ p eval "yield", b
+}
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091015/b438f239/attachment.html>
More information about the macruby-changes
mailing list