Skip to content

Commit

Permalink
jruby fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ahorek committed Aug 30, 2020
1 parent 1091ff7 commit 4203d75
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spec/ffi/long_double_spec.rb
Expand Up @@ -47,4 +47,4 @@ module LibTest
expect(v).to be_within(0.01).of(0.1)
end
end
end if RUBY_ENGINE != "truffleruby"
end unless ['truffleruby', 'jruby'].include?(RUBY_ENGINE)
2 changes: 1 addition & 1 deletion spec/ffi/rbx/attach_function_spec.rb
Expand Up @@ -35,4 +35,4 @@ module LibC
expect(t[:tv_usec]).to be_kind_of(Numeric)
end
end
end
end unless RUBY_ENGINE == 'jruby'
8 changes: 6 additions & 2 deletions spec/ffi/struct_spec.rb
Expand Up @@ -364,13 +364,17 @@ def self.int_field_test(type, values)
int_field_test(:int, [ 0, 0x7fffffff, -0x80000000, -1 ])
int_field_test(:uint, [ 0, 0x7fffffff, 0x80000000, 0xffffffff ])
int_field_test(:long_long, [ 0, 0x7fffffffffffffff, -0x8000000000000000, -1 ])
int_field_test(:ulong_long, [ 0, 0x7fffffffffffffff, 0x8000000000000000, 0xffffffffffffffff ])
if RUBY_ENGINE != 'jruby' # https://github.com/jnr/jffi/issues/87
int_field_test(:ulong_long, [ 0, 0x7fffffffffffffff, 0x8000000000000000, 0xffffffffffffffff ])
end
if FFI::Platform::LONG_SIZE == 32
int_field_test(:long, [ 0, 0x7fffffff, -0x80000000, -1 ])
int_field_test(:ulong, [ 0, 0x7fffffff, 0x80000000, 0xffffffff ])
else
int_field_test(:long, [ 0, 0x7fffffffffffffff, -0x8000000000000000, -1 ])
int_field_test(:ulong, [ 0, 0x7fffffffffffffff, 0x8000000000000000, 0xffffffffffffffff ])
if RUBY_ENGINE != 'jruby' # https://github.com/jruby/jruby/issues/6376
int_field_test(:ulong, [ 0, 0x7fffffffffffffff, 0x8000000000000000, 0xffffffffffffffff ])
end
end

it ":float field r/w" do
Expand Down

0 comments on commit 4203d75

Please sign in to comment.