Skip to content

Commit 85c0c5e

Browse files
committed
One more rubinius fix.
1 parent bdf1acd commit 85c0c5e

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source 'http://rubygems.org'
33
# Example:
44
# gem 'activesupport', '>= 2.3.5'
55

6-
gem 'ffi', '>= 1.0.0', :platform => :mri
6+
gem 'ffi', '>= 1.0.0', :platform => [:mri, :jruby]
77

88
# Add dependencies to develop your gem here.
99
# Include everything needed to run rake, tests, features, etc.

Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ GEM
33
specs:
44
diff-lcs (1.1.2)
55
ffi (1.0.9)
6+
ffi (1.0.9-java)
67
git (1.2.5)
78
jeweler (1.6.0)
89
bundler (~> 1.0.0)

lib/ethernet.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def self.raw_socket(eth_device = nil, ether_type = nil)
3838
end
3939
end
4040

41+
unless defined? Rubinius # ffi is in the standard library in Rubinius
42+
require 'ffi'
43+
end
44+
4145
require 'ethernet/devices.rb'
4246
require 'ethernet/frame_socket.rb'
4347
require 'ethernet/provisioning.rb'

lib/ethernet/devices.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
require 'ffi'
2-
31
# :nodoc: namespace
42
module Ethernet
53

lib/ethernet/provisioning.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
require 'rbconfig'
22

3-
43
# :nodoc: namespace
54
module Ethernet
65

0 commit comments

Comments
 (0)