lib/lightgbm/ffi.rb in lightgbm-0.2.2 vs lib/lightgbm/ffi.rb in lightgbm-0.2.3

- old
+ new

@@ -3,10 +3,10 @@ extend ::FFI::Library begin ffi_lib LightGBM.ffi_lib rescue LoadError => e - if e.message.include?("Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib") && e.message.include?("Reason: image not found") + if ["/usr/local", "/opt/homebrew"].any? { |v| e.message.include?("Library not loaded: #{v}/opt/libomp/lib/libomp.dylib") } && e.message.include?("Reason: image not found") raise LoadError, "OpenMP not found. Run `brew install libomp`" else raise e end end