[#84867] [Ruby trunk Bug#14357] thread_safe tests suite segfaults — v.ondruch@...

Issue #14357 has been reported by vo.x (Vit Ondruch).

11 messages 2018/01/15

[#84980] [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — hsbt@...

Issue #13618 has been updated by hsbt (Hiroshi SHIBATA).

10 messages 2018/01/23
[#85012] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — Eric Wong <normalperson@...> 2018/01/23

hsbt@ruby-lang.org wrote:

[ruby-core:84840] [Ruby trunk Feature#14197] `Enumerable#{select, reject}` accept a pattern argument

From: joshua.goodall@...
Date: 2018-01-11 21:32:48 UTC
List: ruby-core #84840
Issue #14197 has been updated by inopinatus (Joshua GOODALL).


I have personally found it useful to implement Regexp#to_proc as in https://bugs.ruby-lang.org/issues/7883 which permits collection.reject(&/re/) and more besides.

----------------------------------------
Feature #14197: `Enumerable#{select,reject}` accept a pattern argument
https://bugs.ruby-lang.org/issues/14197#change-69553

* Author: znz (Kazuhiro NISHIYAMA)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
`#all?`, `#any?`, `#none?`, and `#one?` accept a pattern argument since 2.5.0.
But `#select`, and `#reject` don't.

The features are exist as `#grep`, and `#grep_v`, but there are hard to remember for me when I use `#select`, or `#reject`.

So I want to write

```ruby
collection.reject(/re/)
```

instead of

```ruby
collection.reject {|item| /re/ =~ item }
```

nor

```ruby
collection.grep_v(/re/)
```



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