summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortduehr <tduehr@gmail.com>2015-06-25 12:27:19 -0500
committertduehr <tduehr@gmail.com>2015-06-25 12:27:19 -0500
commitf75b924ff3abd4c80c66111f1f9c2bbeeb70a171 (patch)
tree937f5b549fc8d2b0028f8a0ed38fd71e46d3296b
parentb19ca98f5b2afacebe72a1fffbf3851bc7c69a16 (diff)
downloadffi-f75b924ff3abd4c80c66111f1f9c2bbeeb70a171.tar.gz
fix struct specs on 1.8
sets them to pending rather than checking for a raise but...
-rw-r--r--lib/ffi/struct.rb2
-rw-r--r--spec/ffi/struct_spec.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/ffi/struct.rb b/lib/ffi/struct.rb
index 599ee9b..89231ba 100644
--- a/lib/ffi/struct.rb
+++ b/lib/ffi/struct.rb
@@ -341,7 +341,7 @@ module FFI
# @raise if Ruby 1.8
# Add hash +spec+ to +builder+.
def hash_layout(builder, spec)
- raise "Ruby version not supported" if RUBY_VERSION =~ /1.8.*/
+ raise "Ruby version not supported" if RUBY_VERSION =~ /1\.8\.*/
spec[0].each do |name, type|
builder.add name, find_field_type(type), nil
end
diff --git a/spec/ffi/struct_spec.rb b/spec/ffi/struct_spec.rb
index 6c03277..1728758 100644
--- a/spec/ffi/struct_spec.rb
+++ b/spec/ffi/struct_spec.rb
@@ -7,6 +7,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
describe "Struct aligns fields correctly" do
it "char, followed by an int" do
+ pending("not supported in 1.8") if RUBY_VERSION =~ /1.8.*/
class CIStruct < FFI::Struct
layout :c => :char, :i => :int
end
@@ -14,6 +15,7 @@ describe "Struct aligns fields correctly" do
end
it "short, followed by an int" do
+ pending("not supported in 1.8") if RUBY_VERSION =~ /1.8.*/
class SIStruct < FFI::Struct
layout :s => :short, :i => :int
end
@@ -21,6 +23,7 @@ describe "Struct aligns fields correctly" do
end
it "int, followed by an int" do
+ pending("not supported in 1.8") if RUBY_VERSION =~ /1.8.*/
class IIStruct < FFI::Struct
layout :i1 => :int, :i => :int
end
@@ -28,6 +31,7 @@ describe "Struct aligns fields correctly" do
end
it "long long, followed by an int" do
+ pending("not supported in 1.8") if RUBY_VERSION =~ /1.8.*/
class LLIStruct < FFI::Struct
layout :l => :long_long, :i => :int
end