Skip to content

Commit

Permalink
Restore support for IO::Buffer in Ruby v3.2.6. (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix authored Oct 4, 2024
1 parent a35e774 commit 17ed794
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/io/event/support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def self.fiber_scheduler_v2?
# 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"
# Fixed in https://github.com/ruby/ruby/pull/11779
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
Expand Down

0 comments on commit 17ed794

Please sign in to comment.