[#84280] [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD — nobu@...
Issue #14181 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/12/15
[#84398] [Ruby trunk Bug#14220] WEBrick changes - failures on MSWIN, MinGW — Greg.mpls@...
Issue #14220 has been reported by MSP-Greg (Greg L).
3 messages
2017/12/22
[#84472] Re: [ruby-dev:50394] [Ruby trunk Bug#14240] warn four special variables: $; $, $/ $\ — Eric Wong <normalperson@...>
Shouldn't English posts be on ruby-core instead of ruby-dev?
3 messages
2017/12/26
[ruby-core:84504] [Ruby trunk Feature#14245] Add File.read etc.
From:
shevegen@...
Date:
2017-12-27 10:49:40 UTC
List:
ruby-core #84504
Issue #14245 has been updated by shevegen (Robert A. Heiler).
> Code like File.read(filename) is considered to
> have no intention to open pipes.
When added, the documentation should also
briefly mention the reference to pipes.
For example, a few months ago I did not even know
about the leading '|' character - I first saw it
on the ruby issue tracker. :)
Current link to File is here:
https://ruby-doc.org/core/File.html
----------------------------------------
Feature #14245: Add File.read etc.
https://bugs.ruby-lang.org/issues/14245#change-69032
* Author: shugo (Shugo Maeda)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
Some people use File.open without knowing that it's defined in IO and pipes can be opened.
```
p File.read("|echo hello") #-> "hello"
```
How about to add File.read, File.binread, File.foreach etc. (similar version to File.open)?
Code like File.read(filename) is considered to have no intention to open pipes.
Implementation by prelude.rb is suggested by normalperson in #14239:
> I like that idea, I've been rewriting some stuff to use
> "File.open(filename, &:read)" instead of IO.read.
>
> Now, can we implement these new singleton methods in
> prelude.rb instead of writing in C? :)
--
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>