[#83096] File.setuid? on IO (Re: [ruby-cvs:67289] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?}) — Nobuyoshi Nakada <nobu@...>
On 2017/10/04 8:47, normal@ruby-lang.org wrote:
5 messages
2017/10/04
[#83100] Re: File.setuid? on IO (Re: [ruby-cvs:67289] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?})
— Eric Wong <normalperson@...>
2017/10/04
Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
[#83105] Re: File.setuid? on IO (Re: [ruby-cvs:67289] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?})
— Nobuyoshi Nakada <nobu@...>
2017/10/04
On 2017/10/04 15:55, Eric Wong wrote:
[#83107] Alias Enumerable#include? to Enumerable#includes? — Alberto Almagro <albertoalmagro@...>
Hello,
9 messages
2017/10/04
[#83113] Re: Alias Enumerable#include? to Enumerable#includes?
— "Urabe, Shyouhei" <shyouhei@...>
2017/10/05
This has been requested countless times, then rejected each and every time.
[#83129] Re: Alias Enumerable#include? to Enumerable#includes?
— Alberto Almagro <albertoalmagro@...>
2017/10/05
Sorry I didn't found it on the core mail list's archive.
[#83138] Re: Alias Enumerable#include? to Enumerable#includes?
— "Urabe, Shyouhei" <shyouhei@...>
2017/10/06
Ruby has not been made of popular votes so far. You have to show us
[#83149] Re: Alias Enumerable#include? to Enumerable#includes?
— Eric Wong <normalperson@...>
2017/10/06
Alberto Almagro <albertoalmagro@gmail.com> wrote:
[#83200] [Ruby trunk Feature#13996] [PATCH] file.c: apply2files releases GVL — normalperson@...
Issue #13996 has been reported by normalperson (Eric Wong).
4 messages
2017/10/10
[ruby-core:83224] [Ruby trunk Bug#14004] ri confused by method aliases and by Queue versus Thread::Queue
From:
xkernigh@...
Date:
2017-10-12 03:46:29 UTC
List:
ruby-core #83224
Issue #14004 has been updated by kernigh (George Koehler).
I run `make html` in my build of Ruby trunk.
This puts the HTML in .ext/html,
so I run `firefox .ext/html/index.html` to view it.
I can confirm that the HTML docs do understand most aliases. For example, Array#append says, *Alias for: push*, in italic; and #push lists #append as an alias. So it seems that the HTML can handle aliases, but ri can't handle them. Bug in ri?
The HTML still doesn't understand that Queue and Thread::Queue are the same. The class document is under Queue and the method documents are under Thread::Queue. This is the same problem as ri.
Array#collect and Array#map have copies of the same doc, because the C code (in array.c) defines both methods using rb_define_method().
```c
rb_define_method(rb_cArray, "collect", rb_ary_collect, 0);
...
rb_define_method(rb_cArray, "map", rb_ary_collect, 0);
```
This is different from Array#append or Array#prepend, where the C code uses rb_define_alias().
```c
rb_define_method(rb_cArray, "push", rb_ary_push_m, -1);
rb_define_alias(rb_cArray, "append", "push");
...
rb_define_method(rb_cArray, "unshift", rb_ary_unshift_m, -1);
rb_define_alias(rb_cArray, "prepend", "unshift");
```
```
----------------------------------------
Bug #14004: ri confused by method aliases and by Queue versus Thread::Queue
https://bugs.ruby-lang.org/issues/14004#change-67173
* Author: kernigh (George Koehler)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.5.0dev (2017-10-10 trunk 60155) [x86_64-openbsd6.2]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
`ri` in Ruby trunk fails to find documentation for some methods.
Array#append and Array#prepend are new in trunk. ri knows that these methods exist, but has no document for them.
```
$ ri Array#append
= Array#append
(from ruby core)
------------------------------------------------------------------------------
append(*args)
------------------------------------------------------------------------------
```
The same problem happens with all methods from `rb_define_alias()` in Ruby's source code. For example, Array#size, IO#to_i, Hash#to_s, and Thread#inspect have no document. These are all aliases of other methods that have document.
There is another problem with Queue, an alias for Thread::Queue. ri doesn't know that Queue has methods.
```
$ ri Queue#push
Nothing known about Queue#push
```
The command `ri Queue` shows the document for the class, but it has no methods. The command `ri Thread::Queue` shows methods, but no class document. The same problem happens with other classes in rthread_sync.c, like Mutex.
--
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>