Skip to content

Commit a4db925

Browse files
committed
Require the right binary
1 parent d470927 commit a4db925

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/pitchfork.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,13 @@ def time_now(int = false)
186186
end
187187
# :enddoc:
188188

189-
require 'pitchfork/pitchfork_http'
189+
begin
190+
# Load the precompiled version of the library
191+
ruby_version = /(\d+\.\d+)/.match(RUBY_VERSION)
192+
require "pitchfork/#{ruby_version}/pitchfork_http"
193+
rescue LoadError
194+
require 'pitchfork/pitchfork_http'
195+
end
190196

191197
Pitchfork::REFORKING_AVAILABLE = Pitchfork::CHILD_SUBREAPER_AVAILABLE || Process.pid == 1
192198

0 commit comments

Comments
 (0)