akihikodaki / cld3-ruby

cld3-ruby is an interface of Compact Language Detector v3 (CLD3) for Ruby.
Apache License 2.0
77 stars 22 forks source link

Use RbConfig to determine the file name of the library #2

Closed akihikodaki closed 7 years ago

akihikodaki commented 7 years ago

FFI.map_library_name is inappropriate for macOS, where it is different from the file name determined by mkmf. Use RbConfig::CONFIG["DLEXT"] instead as mkmf does.

The problem for macOS has been reported at https://github.com/tootsuite/mastodon/pull/2949#issuecomment-300260804 and #1.

akihikodaki commented 7 years ago

Merged after discussions in #1.