From d20844c082c3fd4905e2cb9a6b318189d9ca1acb Mon Sep 17 00:00:00 2001 From: ko1 Date: Mon, 19 May 2008 05:20:21 +0000 Subject: * bootstraptest/test_knownbug.rb: move solved tests. * bootstraptest/test_eval.rb, test_literal.rb, test_syntax.rb, test_thread.rb: ditto. * test/ruby/test_m17n.rb, test_proc.rb, test_sprintf.rb, test_string.rb, test/ruby/test_struct.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_proc.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/ruby/test_proc.rb') diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index 3c1ea7642..ee53eeaf3 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -210,6 +210,18 @@ class TestProc < Test::Unit::TestCase assert_equal(fib, [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]) end + def test_curry_from_knownbug + a = lambda {|x, y, &b| b } + b = a.curry[1] + + assert_equal(:ok, + if b.call(2){} == nil + :ng + else + :ok + end, 'moved from btest/knownbug, [ruby-core:15551]') + end + def test_dup_clone b = proc {|x| x + "bar" } class << b; attr_accessor :foo; end -- cgit