module IO::Event::Support

def self.fiber_scheduler_v2?

To be removed on 31 Mar 2026.

More advanced read/write methods and blocking controls were introduced in Ruby 3.2.
def self.fiber_scheduler_v2?
	# Some interface changes were back-ported incorrectly:
	# https://github.com/ruby/ruby/pull/10778
	# Specifically "Improvements to IO::Buffer read/write/pread/pwrite."
	# Missing correct size calculation.
	return false if RUBY_VERSION >= "3.2.5"
	
	IO.const_defined?(:Buffer) and Fiber.respond_to?(:blocking) and IO::Buffer.instance_method(:read).arity == -1
end