summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-26 03:08:26 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-26 03:08:26 +0000
commit35ec34fa2f20e208e2d1ad5574c7d81a8ae9ecc3 (patch)
tree78ae88f5bb834ab555dd5b8bae4bfe8e30d52c75 /test
parent90ac7da8c85bd1a1f13cf2bee7381ae77a4a928e (diff)
Merge from ruby_1_8, including r16205.
Note that passing a block to a Proc is experimental and partly broken. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_proc.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index f0b78ff..0ddc76a 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -86,4 +86,9 @@ class TestProc < Test::Unit::TestCase
b = lambda {}
assert_not_equal(a, b)
end
+
+ def test_block_par
+ assert_equal(10, Proc.new{|&b| b.call(10)}.call {|x| x})
+ assert_equal(12, Proc.new{|a,&b| b.call(a)}.call(12) {|x| x})
+ end
end