ruby-changes:45947
From: nobu <ko1@a...>
Date: Sun, 19 Mar 2017 00:58:18 +0900 (JST)
Subject: [ruby-changes:45947] nobu:r58018 (trunk): test_lambda.rb: remove duplcate tests
nobu 2017-03-19 00:58:13 +0900 (Sun, 19 Mar 2017) New Revision: 58018 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58018 Log: test_lambda.rb: remove duplcate tests Modified files: trunk/test/ruby/test_lambda.rb Index: test/ruby/test_lambda.rb =================================================================== --- test/ruby/test_lambda.rb (revision 58017) +++ test/ruby/test_lambda.rb (revision 58018) @@ -101,32 +101,6 @@ class TestLambdaParameters < Test::Unit: https://github.com/ruby/ruby/blob/trunk/test/ruby/test_lambda.rb#L101 assert_equal(:ok, x, bug13090) end - def yield_1(arg) - yield arg - end - - tap do |;bug9605, expected, result| - bug9605 = '[ruby-core:65887] [Bug #9605] arity check should be relaxed' - expected = [1,2,3] - - [ - ["array", expected], - ["to_ary", Struct.new(:to_ary).new(expected)], - ].product \ - [ - ["proc", proc {|a, b, c| [a, b, c]}], - ["lambda", lambda {|a, b, c| [a, b, c]}], - ] do - |(vtype, val), (btype, block)| - define_method("test_yield_relaxed(#{vtype},&#{btype})") do - result = assert_nothing_raised(ArgumentError, bug9605) { - break yield_1(val, &block) - } - assert_equal(expected, result, bug9605) - end - end - end - def foo assert_equal(nil, ->(&b){ b }.call) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/