Ashton fails to load because dynamic libraries have a .bundle extension on OS X (actually that is not generally correct, but that is what Ruby uses):
begin
RUBY_VERSION =~ /(\d+.\d+)/
require "ashton/#{$1}/ashton.so"
rescue LoadError
require "ashton/ashton.so"
end
RbConfig::CONFIG['DLEXT'] give you the file extension. Sorry for not sending a pull request, I just realised I could do this while typing this issue. :)
Ashton fails to load because dynamic libraries have a
.bundle
extension on OS X (actually that is not generally correct, but that is what Ruby uses):RbConfig::CONFIG['DLEXT']
give you the file extension. Sorry for not sending a pull request, I just realised I could do this while typing this issue. :)