[#97536] [Ruby master Bug#16694] JIT vs hardened GCC with PCH — v.ondruch@...
Issue #16694 has been reported by vo.x (Vit Ondruch).
11 messages
2020/03/18
[ruby-core:97527] [Ruby master Bug#12671] Hash#to_proc result is not a lambda, but enforces arity
From:
mame@...
Date:
2020-03-16 13:45:40 UTC
List:
ruby-core #97527
Issue #12671 has been updated by mame (Yusuke Endoh).
This ticket was briefly discussed at today's dev meeting, and matz said that the result of Hash#to_proc should be a lambda.
----------------------------------------
Bug #12671: Hash#to_proc result is not a lambda, but enforces arity
https://bugs.ruby-lang.org/issues/12671#change-84683
* Author: headius (Charles Nutter)
* Status: Open
* Priority: Normal
* ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin14]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
```
$ ruby23 -e 'pr = {foo:1}.to_proc; puts pr.lambda?; pr.call rescue puts $!; pr.call(1, 2) rescue puts $!'
false
wrong number of arguments (given 0, expected 1)
wrong number of arguments (given 2, expected 1)
```
I believe it should be marked as a lambda, since it enforces arity.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>