summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-22 00:30:55 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-22 00:30:55 +0900
commit5cab86f3b0725457be3c50d3cab43b04bea53290 (patch)
tree524af33a5c9c912b87315c7e84db2163eb91bda3
parent0b4500d982d2670e7025c61f50ab25bdc6de7834 (diff)
`Proc` made by `Symbol#to_proc` should be a lambda [Bug #16260]
-rw-r--r--test/ruby/test_symbol.rb4
1 files changed, 4 insertions, 0 deletions
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"