Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jruby fixes #821

Merged
merged 1 commit into from Aug 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on Windows, gettimeofday doesn't exist in the standard libc library, but cruby redefines it. That's why it cannot be supported on 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