[#60404] is RB_GC_GUARD needed in rb_io_syswrite? — Eric Wong <normalperson@...>
I haven't gotten it to crash as-is, but it seems like we need to
4 messages
2014/02/01
[#60682] volatile usages — Eric Wong <normalperson@...>
Hi all, I went ahead and removed some use of volatile which were once
5 messages
2014/02/13
[#60794] [RFC] rearrange+pack vtm and time_object structs — Eric Wong <normalperson@...>
Extracted from addendum on top of Feature #9362 (cache-aligned objects).
4 messages
2014/02/16
[#61139] [ruby-trunk - Feature #9577] [Open] [PATCH] benchmark/driver.rb: align columns in text output — normalperson@...
Issue #9577 has been reported by Eric Wong.
3 messages
2014/02/28
[ruby-core:60746] [ruby-trunk - Feature #7596] Find::find should not silently ignores errors
From:
nobu@...
Date:
2014-02-14 16:33:30 UTC
List:
ruby-core #60746
Issue #7596 has been updated by Nobuyoshi Nakada.
What about an optional error handler?
Simple flag may not be enough, for example, to search unreadable directories.
----------------------------------------
Feature #7596: Find::find should not silently ignores errors
https://bugs.ruby-lang.org/issues/7596#change-45166
* Author: Hoylen Sue
* Status: Open
* Priority: Low
* Assignee: Yukihiro Matsumoto
* Category: lib
* Target version: next minor
----------------------------------------
=begin
The current implementation of (({Find::find})) silently ignores errors. It deliberately catches a number of (({Errno::*})) errors and just continues processing. This can cause unexpected (and often unnoticed) results when, for example, unreadable directories are encountered. Find will not recurse into those directories, but does also not tell the user that it is skipping them and their contents. This happened to me when there was a directory owned by another user.
I suggest making the default behaviour to ((*not*)) ignore errors. But then provide an ((*option*)) for the caller to indicate that they want (({find})) to keep going if it encounters some types of errors. This way the caller has control and the default behaviour is the one with "least surprise" for the caller.
Either that, or at least change the documentation to point out that the current implementation silently ignores errors and unreadable directories. That way the caller will know the limitations of the method.
http://www.ruby-doc.org/stdlib-1.9.3/libdoc/find/rdoc/Find.html
When updating the documentation, it would also be useful for documentation for the "Find" module's "find" class method to also point out that:
"The associated block is never called with "." or "..", except when they are explicitly provided as one of the arguments."
You can check this behavour by trying out different values for "testdirname" in the following command
ruby -e 'require "find"; Find.find(ARGV[0]) { |d| puts "<#{d}>" }' testdirname
=end
--
http://bugs.ruby-lang.org/