Skip to content

Commit

Permalink
Load C extension with require_relative (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Dec 27, 2022
1 parent 0e5607b commit 4f8f2fa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/ox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,9 @@ module Ox
require 'ox/bag'
require 'ox/sax'

require 'ox/ox' # C extension
# C extension
begin
require_relative 'ox.so'
rescue LoadError
require 'ox/ox'
end

0 comments on commit 4f8f2fa

Please sign in to comment.