From 3dbd703511ff5207eeed5adc74989fb2c94cc698 Mon Sep 17 00:00:00 2001
From: Bernd Ohr <jazzbox@7zz.de>
Date: Thu, 15 Oct 2009 14:30:42 +0200
Subject: [PATCH] add failing tests: binding with block

---
 test_vm/eval.rb |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/test_vm/eval.rb b/test_vm/eval.rb
index 95c581b..85aa271 100644
--- a/test_vm/eval.rb
+++ b/test_vm/eval.rb
@@ -118,4 +118,25 @@ assert 'true', %{
   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
+}
+
-- 
1.6.4.3


