From: KOSAKI Motohiro Date: 2016-01-11T13:55:26-05:00 Subject: [ruby-core:72809] Re: [Ruby trunk - Bug #11973] [Open] IO#advise should raise NotImplementedError on platforms that do not support that call On Sun, Jan 10, 2016 at 5:26 PM, wrote: > Issue #11973 has been reported by Chuck Remes. > > ---------------------------------------- > Bug #11973: IO#advise should raise NotImplementedError on platforms that do not support that call > https://bugs.ruby-lang.org/issues/11973 > > * Author: Chuck Remes > * Status: Open > * Priority: Normal > * Assignee: > * ruby -v: 2.4.0 > * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN > ---------------------------------------- > Right now IO#advise returns nil when passed legal arguments even on platforms that do not support that POSIX function (like OS X). To be consistent with other calls in core, I think that IO#advise should raise NotImplementedError for unsupported platforms. Simply impossible. For example, Linux define POSIX_FADV_NOREUSE, but not implement AND no error return. Then, IO#advise return nil and just no-op in this case. We can implement raise NotImplementedError SOME CASES and not raise another some cases. But nobody want such inconsistency mess. Unsubscribe: