[#79914] [Ruby trunk Bug#13282] opt_str_freeze does not always dedupe — normalperson@...
Issue #13282 has been reported by Eric Wong.
4 messages
2017/03/05
[#80140] [Ruby trunk Feature#13295] [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus) — shyouhei@...
Issue #13295 has been updated by shyouhei (Shyouhei Urabe).
5 messages
2017/03/13
[#80362] Re: [Ruby trunk Feature#13295] [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus)
— Eric Wong <normalperson@...>
2017/03/26
shyouhei@ruby-lang.org wrote:
[#80368] Re: [Ruby trunk Feature#13295] [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus)
— SASADA Koichi <ko1@...>
2017/03/27
On 2017/03/26 15:16, Eric Wong wrote:
[#80205] Re: [ruby-cvs:65166] duerst:r58000 (trunk): clarifiy 'codepoint' in documentation of String#each_codepoint — Eric Wong <normalperson@...>
duerst@ruby-lang.org wrote:
4 messages
2017/03/17
[#80213] Re: [ruby-cvs:65166] duerst:r58000 (trunk): clarifiy 'codepoint' in documentation of String#each_codepoint
— Martin J. Dürst <duerst@...>
2017/03/17
Hello Eric,
[#80290] [Ruby trunk Feature#13355] [PATCH] compile.c: optimize literal String range in case/when dispatch — normalperson@...
Issue #13355 has been reported by normalperson (Eric Wong).
4 messages
2017/03/23
[#80410] Re: [Ruby trunk Feature#13355] [PATCH] compile.c: optimize literal String range in case/when dispatch
— Eric Wong <normalperson@...>
2017/03/27
normalperson@yhbt.net wrote:
[#80415] [Ruby trunk Feature#12589] VM performance improvement proposal — vmakarov@...
Issue #12589 has been updated by vmakarov (Vladimir Makarov).
5 messages
2017/03/28
[#80488] [Ruby trunk Feature#12589] VM performance improvement proposal — vmakarov@...
Issue #12589 has been updated by vmakarov (Vladimir Makarov).
4 messages
2017/03/29
[ruby-core:80226] [Ruby trunk Bug#13276][Assigned] Dir.glob returns empty array when OS has no more file handles (expected exception)
From:
nobu@...
Date:
2017-03-19 01:44:23 UTC
List:
ruby-core #80226
Issue #13276 has been updated by nobu (Nobuyoshi Nakada).
Status changed from Open to Assigned
Assignee set to nobu (Nobuyoshi Nakada)
This bug predates 1.0, so it will be fixed by 2.5 but won't be backported.
----------------------------------------
Bug #13276: Dir.glob returns empty array when OS has no more file handles (expected exception)
https://bugs.ruby-lang.org/issues/13276#change-63663
* Author: floehopper (James Mead)
* Status: Assigned
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version:
* ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin14]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
The following terminal session demonstrates how `Dir.glob` returns an empty array when the OS has run out of file handles; whereas `File.new` raises a `Errno::EMFILE` exception.
I would expect `Dir.glob` to fail fast in a similar way to `File.new`.
~~~
$ mkdir /tmp/ruby-dir-glob-returns-empty-array-when-too-many-open-files
$ cd /tmp/ruby-dir-glob-returns-empty-array-when-too-many-open-files
$ touch foo
$ ulimit -n 16
$ ruby -e "1.upto(16).map { |i| p [i, Dir.glob('*')]; File.new('foo') }"
[1, ["foo"]]
[2, ["foo"]]
[3, ["foo"]]
[4, ["foo"]]
[5, ["foo"]]
[6, ["foo"]]
[7, ["foo"]]
[8, ["foo"]]
[9, ["foo"]]
[10, []] # Dir.glob returns empty array and does not raise exception
-e:1:in `initialize': Too many open files @ rb_sysopen - foo (Errno::EMFILE)
from -e:1:in `new'
from -e:1:in `block in <main>'
from -e:1:in `upto'
from -e:1:in `each'
from -e:1:in `map'
from -e:1:in `<main>'
~~~
The following is a counter example which shows how `Dir.new` raises an exception under the same conditions.
~~~
$ mkdir /tmp/ruby-dir-new-raises-exception-when-too-many-files-open
$ cd /tmp/ruby-dir-new-raises-exception-when-too-many-files-open
$ touch foo
$ mkdir bar
$ ulimit -n 16
$ ruby -e "1.upto(16).map { |i| p [i, Dir.new('bar')]; File.new('foo') }"
[1, #<Dir:bar>]
[2, #<Dir:bar>]
[3, #<Dir:bar>]
[4, #<Dir:bar>]
[5, #<Dir:bar>]
[6, #<Dir:bar>]
[7, #<Dir:bar>]
[8, #<Dir:bar>]
[9, #<Dir:bar>]
-e:1:in `initialize': Too many open files @ dir_initialize - bar (Errno::EMFILE)
from -e:1:in `new'
from -e:1:in `block in <main>'
from -e:1:in `upto'
from -e:1:in `each'
from -e:1:in `map'
from -e:1:in `<main>'
~~~
This is what I would expect for `Dir.glob`, i.e. I would expect an exception like this: `Too many open files @ dir_s_glob (Errno::EMFILE)` in the first example.
--
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>