Skip to content

Commit

Permalink
add compatibility for Ruby 3.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
paddor committed Jan 7, 2024
1 parent 4f9841b commit 1f710c6
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/stable_api.yml
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@ jobs:
strategy:
matrix:
ruby:
- '3.0'
- '3.1'
- '3.2'
- '3.3'
steps:
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -117,8 +117,6 @@ At least:

* Ruby 3.0, 3.1, 3.2, 3.3

Using CZTop with Async will require Ruby 3.2 because of the use of `IO::TimeoutError`, which was introduced in Ruby 3.2.

## Installation

To use this gem, add this line to your application's Gemfile:
6 changes: 6 additions & 0 deletions lib/cztop/send_receive_methods.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# frozen_string_literal: true

# Support Ruby < 3.2
unless defined? IO::TimeoutError
class IO::TimeoutError < IOError
end
end

module CZTop
# These are methods that can be used on a {Socket} as well as an {Actor},
# but actually just pass through to methods of {Message} (which take

0 comments on commit 1f710c6

Please sign in to comment.