summaryrefslogtreecommitdiff
path: root/bootstraptest/test_proc.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-19 15:43:25 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-19 15:43:25 +0000
commite7dac48a9190169a241865cd706566b52e07b3b7 (patch)
tree829a96c85e03e03f4ed59c62d31a30c5a63bb5d1 /bootstraptest/test_proc.rb
parentaf94c81302cd778d5e62ddae714e52c891f69d38 (diff)
* proc.c (proc_new): fix to return Proc object if block is already
in heap. [ruby-core:15711] * bootstraptest/test_proc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_proc.rb')
-rw-r--r--bootstraptest/test_proc.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/bootstraptest/test_proc.rb b/bootstraptest/test_proc.rb
index f384ba3..2fb5da4 100644
--- a/bootstraptest/test_proc.rb
+++ b/bootstraptest/test_proc.rb
@@ -378,3 +378,20 @@ assert_equal 'ok', %q{
m()
}
+assert_equal 'ok', %q{
+ class Foo
+ def call_it
+ p = Proc.new
+ p.call
+ end
+ end
+
+ def give_it
+ proc { :ok }
+ end
+
+ f = Foo.new
+ a_proc = give_it
+ p :call_it
+ f.call_it(&give_it())
+}, '[ruby-core:15711]'