From 5cab86f3b0725457be3c50d3cab43b04bea53290 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 22 Feb 2020 00:30:55 +0900 Subject: `Proc` made by `Symbol#to_proc` should be a lambda [Bug #16260] --- test/ruby/test_symbol.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/ruby/test_symbol.rb') diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index 660f2e1574..2e9710e4dc 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -153,6 +153,10 @@ class TestSymbol < Test::Unit::TestCase end; end + def test_to_proc_lambda? + assert_predicate(:itself.to_proc, :lambda?) + end + def test_to_proc_call_with_symbol_proc first = 1 bug11594 = "[ruby-core:71088] [Bug #11594] corrupted the first local variable" -- cgit v1.2.3