[#71931] [Ruby trunk - Feature #11786] [Open] [PATCH] micro-optimize case dispatch even harder — normalperson@...

Issue #11786 has been reported by Eric Wong.

9 messages 2015/12/08

[ruby-core:72064] Re: [Ruby trunk - Feature #11806] [PATCH] IO#advise should not raise Errno::ENOSYS

From: Eric Wong <normalperson@...>
Date: 2015-12-11 22:27:23 UTC
List: ruby-core #72064
nobu@ruby-lang.org wrote:
> Or `rb_sys_fail` should map `ESYS` to `NotImplementedError`?

I don't think that's a good idea.  We are already silent on
systems without HAVE_POSIX_FADVISE at build time.

IO#advise is only a hint to me as it wraps posix_fadvise.

Our own RDoc says:

	On platforms that do not support the <em>posix_fadvise(2)</em>
	system call, this method is a no-op.

Current Linux kernels ignores POSIX_FADV_NOREUSE entirely;
and it is silently ignored on O_DIRECT files.

So I think it is better for us to be silent on ENOSYS, as well.

In This Thread

Prev Next