[#83107] Alias Enumerable#include? to Enumerable#includes? — Alberto Almagro <albertoalmagro@...>

Hello,

9 messages 2017/10/04

[ruby-core:83096] File.setuid? on IO (Re: [ruby-cvs:67289] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?})

From: Nobuyoshi Nakada <nobu@...>
Date: 2017-10-04 06:05:56 UTC
List: ruby-core #83096
On 2017/10/04 8:47, normal@ruby-lang.org wrote:
> normal    2017-10-04 08:47:29 +0900 (Wed, 04 Oct 2017)
>
>   New Revision: 60108
>
>   https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60108
>
>   Log:
>     file.c: release GVL in File.{setuid?,setgid?,sticky?}
>
>     * file.c (check3rdbyte): use rb_stat to release GVL

These methods now accept an `IO` instance, not only a path name.
Is this intentional?

```
$ ./ruby -v -e 'p File.setuid?(STDIN)'
ruby 2.5.0dev (2017-10-03 trunk 60115) [x86_64-darwin15]
Traceback (most recent call last):
    1: from -e:1:in `<main>'
-e:1:in `setuid?': no implicit conversion of IO into String (TypeError)
```
```
$ ./ruby -v -e 'p File.setuid?(STDIN)'
ruby 2.5.0dev (2017-10-03 trunk 60107) [x86_64-darwin15]
false
```

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