[#104169] [Ruby master Feature#17938] Keyword alternative for boolean positional arguments — matheusrichardt@...

Issue #17938 has been reported by matheusrich (Matheus Richard).

12 messages 2021/06/04

[#104213] [Ruby master Feature#17942] Add a `initialize(public @a, private @b)` shortcut syntax for defining public/private accessors for instance vars — tyler@...

Issue #17942 has been reported by TylerRick (Tyler Rick).

6 messages 2021/06/09

[#104288] [Ruby master Bug#17992] Upstreaming the htmlentities gem into CGI#.(un)escape_html — alexandermomchilov@...

Issue #17992 has been reported by AMomchilov (Alexander Momchilov).

9 messages 2021/06/15

[#104338] [Ruby master Misc#17997] DevelopersMeeting20210715Japan — mame@...

Issue #17997 has been reported by mame (Yusuke Endoh).

10 messages 2021/06/17

[#104361] [Ruby master Bug#18000] have_library doesn't work when ruby is compiled with --disable-shared --disable-install-static-library — jean.boussier@...

Issue #18000 has been reported by byroot (Jean Boussier).

9 messages 2021/06/18

[#104401] [Ruby master Feature#18007] Help developers of C extensions meet requirements in "doc/extension.rdoc" — mike.dalessio@...

Issue #18007 has been reported by mdalessio (Mike Dalessio).

16 messages 2021/06/25

[#104430] [Ruby master Bug#18011] `Method#parameters` is incorrect for forwarded arguments — josh.cheek@...

Issue #18011 has been reported by josh.cheek (Josh Cheek).

12 messages 2021/06/29

[ruby-core:104286] [Ruby master Feature#17838] `Set#intersect?` and enumerables

From: merch-redmine@...
Date: 2021-06-15 18:13:23 UTC
List: ruby-core #104286
Issue #17838 has been updated by jeremyevans0 (Jeremy Evans).

Backport deleted (2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN)
Status changed from Open to Assigned
Tracker changed from Bug to Feature

This makes sense to me. However, there is a explicit test currently that array arguments are not accepted. So this must be considered a feature request and not a bug. I've submitted an upstream pull request that implements this feature: https://github.com/ruby/set/pull/18

----------------------------------------
Feature #17838: `Set#intersect?` and enumerables
https://bugs.ruby-lang.org/issues/17838#change-92503

* Author: marcandre (Marc-Andre Lafortune)
* Status: Assigned
* Priority: Normal
* Assignee: knu (Akinori MUSHA)
----------------------------------------
`Set#intersect?` currently accepts only a `set` argument.

It should accept an enumerable argument:

```ruby
[1, 2, 3].intersect?(Set[2, 3, 4]) # => true
Set[2, 3, 4].intersection([1, 2, 3]) # => Set[2, 3]
Set[2, 3, 4].intersect?([1, 2, 3]) # => ArgumentError
```

I expect `set.intersect?(arg)` to be an optimized version of `!set.intersection(arg).empty?`

Should I prepare a PR?



-- 
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>

In This Thread

Prev Next