Skip to content

Commit

Permalink
Disable usage of Ractor.make_shareable on Ruby 3.0 as it's broken o…
Browse files Browse the repository at this point in the history
…n Ruby 3.0.2.
  • Loading branch information
ioquatix committed Mar 20, 2024
1 parent e8fd327 commit 7f5a1a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/console/filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Console
UNKNOWN = 'unknown'

class Filter
if Object.const_defined?(:Ractor)
if Object.const_defined?(:Ractor) and RUBY_VERSION >= '3.1'
def self.define_immutable_method(name, &block)
block = Ractor.make_shareable(block)
self.define_method(name, &block)
Expand Down

0 comments on commit 7f5a1a1

Please sign in to comment.