summaryrefslogtreecommitdiff
path: root/test/ruby/test_proc.rb
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-12-12 06:29:11 +0900
committerKoichi Sasada <ko1@atdot.net>2020-12-12 06:29:11 +0900
commit124321e0c7ab8dac1ffce78c653cc677f878d5b0 (patch)
tree53be2cc7989b0392b57ca78afb03b9c4fc9b2b0d /test/ruby/test_proc.rb
parentd741c77b5fd976300815c1ea987e76e92b71122f (diff)
fix lambda's warning and tests
There are warning condition bugs and test bugs. b53ccb9c69abd24e3bdad66cbe4c7e7480eaef16
Diffstat (limited to 'test/ruby/test_proc.rb')
-rw-r--r--test/ruby/test_proc.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index ca690dce0d..04c240813c 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -316,16 +316,20 @@ class TestProc < Test::Unit::TestCase
lambda(&b)
end
+ def_lambda_warning 'test_lambda_warning_pass_symbol_proc', '' do
+ lambda(&:to_s)
+ end
+
def_lambda_warning 'test_lambda_warning_pass_proc', /deprecated/ do
b = proc{}
lambda(&b)
end
- def_lambda_warning 'test_lambda_warning_pass_proc', /deprecated/ do
+ def_lambda_warning 'test_lambda_warning_pass_block', /deprecated/ do
helper_test_warn_lamda_with_passed_block{}
end
- def_lambda_warning 'test_lambda_warning_pass_proc', '' do
+ def_lambda_warning 'test_lambda_warning_pass_block_symbol_proc', '' do
# Symbol#to_proc returns lambda
helper_test_warn_lamda_with_passed_block(&:to_s)
end