From befa638faf2dbfe97e2d97ba383ca94e305291c5 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 12 Aug 2020 14:16:19 -0700 Subject: [PATCH] Optimize requires for non-omnibus installs require is quite slow in Ruby and doing requires for things you've already required is also slow. We've used this simple hack in Chef to speed up our requires. In the omnibus installs we patch how rubygems works to make this somewhat pointless, but this will help non-omnibus installs Signed-off-by: Tim Smith --- lib/ffi-libarchive/archive.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ffi-libarchive/archive.rb b/lib/ffi-libarchive/archive.rb index 7682b09..fd8d483 100644 --- a/lib/ffi-libarchive/archive.rb +++ b/lib/ffi-libarchive/archive.rb @@ -1,4 +1,4 @@ -require "ffi" +require "ffi" unless defined?(FFI) module Archive module C