-
Notifications
You must be signed in to change notification settings - Fork 185
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
Pass the hexapdf test suite #2822
Comments
I've investigated the failed specs and found out that there are basically two issues:
Array#rejectThe first issue can be reproduced by modifying an array during iterations through the array with It can be reproduced with the following code: a = [:a]
counter = 0
a.reject do |el|
if counter < 1
a << :b
counter += 1
end
false
end In CRuby (3.1.3) On TruffleRuby internal exception is raised. Floating point numbersThere are several tests that fail because Test #1 # rbenv local 3.1.3
6.5358983848622465.round(6).to_s # => "6.535898"
5.7639320225002075.round(6).to_s # => "5.763932"
6.535898384862244.round(6).to_s # => "6.535898"
# rbenv local truffleruby-jvm
6.5358983848622465.round(6).to_s => "6.5358979999999995"
5.763932022500207.round(6).to_s => "5.7639320000000005"
6.535898384862244.round(6).to_s => "6.5358979999999995" Test #2 # rbenv local 3.1.3
1.616.round(6).to_s # => "1.616"
# rbenv local truffleruby-jvm
1.616.round(6).to_s # => "1.6159999999999999" Test #3 # rbenv local 3.1.3
23.609.round(6).to_s # => "23.609"
# rbenv local truffleruby-jvm
23.609.round(6).to_s # => "23.608999999999998" Test #4 # rbenv local 3.1.3
3.381966011250105.round(6).to_s # => "3.381966"
8.624771282204213.round(6).to_s # => "8.624771"
7.911127102658033.round(6).to_s # => "7.911127"
7.911127102658032.round(6).to_s # => "7.911127"
8.624771282204211.round(6).to_s # => "8.624771"
# rbenv local truffleruby-jvm
3.381966011250105.round(6).to_s # => "3.3819660000000002"
8.624771282204213.round(6).to_s # => "8.624770999999999"
7.911127102658033.round(6).to_s # => "7.9111270000000005"
7.911127102658032.round(6).to_s # => "7.9111270000000005"
8.624771282204211.round(6).to_s # => "8.624770999999999" |
Thanks, it looks like we need fix reject/reject!, and also fix Float#round. Note that if the
|
|
I just tested HexaPDF 1.0.0 with the latest TruffleRuby 24.1.1. Besides the issue with
|
This used to work in #1391.
Unfortunately there was no CI for hexapdf at the time and it regressed (e.g. #2770).
Now hexapdf has a CI: gettalong/hexapdf#199 (comment)
So we should suggest to add truffleruby there, but first of course we need to pass all tests.
Some tests fail on latest hexapdf, see https://github.com/eregon/hexapdf/actions/workflows/ci.yml
The text was updated successfully, but these errors were encountered: