Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Commit

Permalink
Rubinius, Y U NO FFI::PLATFORM::OS?!
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Nov 9, 2012
1 parent cf2f15e commit e3a258e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/cyberplat_pki/library.rb
Expand Up @@ -3,7 +3,17 @@
module CyberplatPKI::Library
extend FFI::Library

tuple = "#{FFI::Platform::OS}-#{FFI::Platform::ARCH}"
if defined?(Rubinius) # Fuck you.
if Rubinius.windows?
tuple = "windows-#{FFI::Platform::ARCH}"
elsif RUBY_PLATFORM =~ /linux/
tuple = "linux-#{FFI::Platform::ARCH}"
else
tuple = "unknown"
end
else
tuple = "#{FFI::Platform::OS}-#{FFI::Platform::ARCH}"
end

if tuple == 'windows-i386'
ffi_lib File.expand_path('../../../ext/libipriv32.dll', __FILE__)
Expand Down

0 comments on commit e3a258e

Please sign in to comment.