Revision
2818
Author
lsansonetti@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

Diff

Modified: MacRuby/trunk/test_vm/eval.rb (2817 => 2818)


--- 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
+}
+