ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:100192] [Ruby master Bug#17197] Some Hash methods still have arity 2 instead of 1
@ 2020-09-28  2:13 marcandre-ruby-core
  2020-09-28  2:30 ` [ruby-core:100194] " marcandre-ruby-core
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: marcandre-ruby-core @ 2020-09-28  2:13 UTC (permalink / raw)
  To: ruby-core

Issue #17197 has been reported by marcandre (Marc-Andre Lafortune).

----------------------------------------
Bug #17197: Some Hash methods still have arity 2 instead of 1
https://bugs.ruby-lang.org/issues/17197

* Author: marcandre (Marc-Andre Lafortune)
* Status: Open
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* ruby -v: ruby 3.0.0dev (2020-09-26T17:38:39Z master 950614b088)
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
`Hash#each` was changed recently to have arity of 1.
All other methods of `Hash` should behave the same.
Much has been fixed since #14015, but some remains:

```ruby
# Some methods consistently have arity 2:
{a: 1}.select( &->(_kvp) {} ) # => ArgumentError (wrong number of arguments (given 2, expected 1))
```

All in all: `%i[select keep_if delete_if reject to_h]` have their arity still set at 2.




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-11-30 19:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28  2:13 [ruby-core:100192] [Ruby master Bug#17197] Some Hash methods still have arity 2 instead of 1 marcandre-ruby-core
2020-09-28  2:30 ` [ruby-core:100194] " marcandre-ruby-core
2020-09-28  9:13 ` [ruby-core:100196] " eregontp
2020-09-28  9:28 ` [ruby-core:100197] " eregontp
2020-10-23 21:08 ` [ruby-core:100516] " marcandre-ruby-core
2020-11-16  7:59 ` [ruby-core:100867] " mame
2020-11-16 14:04 ` [ruby-core:100875] " daniel
2020-11-16 22:37 ` [ruby-core:100880] " eregontp
2020-11-17 13:37 ` [ruby-core:100899] " daniel
2020-11-17 14:24 ` [ruby-core:100900] " mame
2020-11-20  7:34 ` [ruby-core:100964] " matz
2020-11-20  8:25 ` [ruby-core:100968] " marcandre-ruby-core
2020-11-26 12:33 ` [ruby-core:101092] " matz
2020-11-30 19:22 ` [ruby-core:101166] " daniel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).