Skip to content

Fiddle test failing with JRuby 10 #8780

@ankane

Description

@ankane

Currently, one of the Fiddle tests fails with JRuby 10 (which passes with 9.4.12.0).

git clone https://github.com/ruby/fiddle.git
cd fiddle
bundle install
bundle exec rake test

Based on the error message, it seems like it may be an issue with JRuby (it's trying to convert a value to a long instead of an unsigned long), but haven't been able to identify the exact cause.

Environment Information

Provide at least:

  • jruby 10.0.0.0 (3.4.2) 2025-04-13 6ed59bc OpenJDK 64-Bit Server VM 21.0.6 on 21.0.6 +indy +jit [arm64-darwin]
  • macOS 15.4.1 arm64

Expected Behavior

All tests pass.

Actual Behavior

A single test failure:

Error: test_conversion_unsigned_long(Fiddle::TestClosure): RangeError: bignum too big to convert into 'long'
/Users/andrew/forks/fiddle/lib/fiddle/ffi_backend.rb:174:in 'call'
/Users/andrew/forks/fiddle/test/fiddle/test_closure.rb:154:in 'block in TestClosure'
/Users/andrew/forks/fiddle/lib/fiddle/closure.rb:20:in 'create'
/Users/andrew/forks/fiddle/test/fiddle/test_closure.rb:145:in 'block in TestClosure'
org/jruby/RubyKernel.java:1397:in 'catch'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions