lib/faster_path.rb in faster_path-0.0.4 vs lib/faster_path.rb in faster_path-0.0.5
- old
+ new
@@ -26,17 +26,16 @@
end
private
module Rust
extend FFI::Library
- #ffi_lib 'target/release/libfaster_path.so'
ffi_lib begin
- "#{File.expand_path("../target/release/", File.dirname(__FILE__))}/libfaster_path.#{FFI::Platform::LIBSUFFIX}"
+ prefix = Gem.win_platform? ? "" : "lib"
+ "#{File.expand_path("../target/release/", File.dirname(__FILE__))}/#{prefix}faster_path.#{FFI::Platform::LIBSUFFIX}"
end
attach_function :is_absolute, [ :string ], :bool
attach_function :is_blank, [ :string ], :bool
attach_function :basename, [ :string ], :string
attach_function :dirname, [ :string ], :string
- #attach_function :chop_basename, [ :string ], [:string]
end
private_constant :Rust
end