Skip to content

Commit

Permalink
fix from sass#146
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan Hill committed Jun 7, 2024
1 parent 4fce2b6 commit e9825c2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/sassc/native.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ module Native
extend FFI::Library

dl_ext = RbConfig::MAKEFILE_CONFIG['DLEXT']
begin
ffi_lib File.expand_path("libsass.#{dl_ext}", __dir__)
rescue LoadError # Some non-rvm environments don't copy a shared object over to lib/sassc
ffi_lib File.expand_path("libsass.#{dl_ext}", "#{__dir__}/../../ext")
end
candidates = ["#{__FILE__}/..", "#{__FILE__}/../../ext/libsass"]
candidates.unshift(Gem.loaded_specs['sassc'].extension_dir) if Gem.loaded_specs['sassc']
ffi_lib(candidates.map { |dir| File.expand_path("libsass.#{dl_ext}", dir) })

require_relative "native/sass_value"

Expand Down

0 comments on commit e9825c2

Please sign in to comment.