Skip to content

Commit

Permalink
Fix loading on Ruby 3.2 (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
malmckay authored Jan 6, 2023
1 parent a99f3bf commit 767c9cb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ext/c_zookeeper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
'zookeeper/exceptions' # zookeeper_c depends on exceptions defined in here
)

Zookeeper.require_root 'ext/zookeeper_c'

# require File.expand_path('../zookeeper_c', __FILE__)
begin
Zookeeper.require_root 'ext/zookeeper_c'
rescue LoadError # Rubygems 3.4+ cleans up build artifacts in the ext/ directory.
Zookeeper.require_lib 'zookeeper_c'
end

module Zookeeper
# NOTE: this class extending (opening) the class defined in zkrb.c
Expand Down

0 comments on commit 767c9cb

Please sign in to comment.