Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
load_ffi created to conditionally load FFI based on RUBY_ENGINE
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Aug 28, 2011
1 parent 466d3e2 commit fb7e114
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/virtualbox/com/ffi.rb
@@ -1,4 +1,4 @@
require 'ffi'
require 'virtualbox/com/ffi/load_ffi'

module VirtualBox
module COM
Expand Down
2 changes: 1 addition & 1 deletion lib/virtualbox/com/ffi/interface.rb
@@ -1,4 +1,4 @@
require 'ffi'
require 'virtualbox/com/ffi/load_ffi'

module VirtualBox
module COM
Expand Down
3 changes: 3 additions & 0 deletions lib/virtualbox/com/ffi/load_ffi.rb
@@ -0,0 +1,3 @@
if !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby"
require 'ffi'
end
2 changes: 1 addition & 1 deletion lib/virtualbox/com/ffi_interface.rb
@@ -1,4 +1,4 @@
require 'ffi'
require 'virtualbox/com/ffi/load_ffi'
require 'virtualbox/ext/logger'

module VirtualBox
Expand Down

0 comments on commit fb7e114

Please sign in to comment.