Skip to content

Conversation

@dduugg
Copy link

@dduugg dduugg commented Dec 26, 2025

@Fryguy
Copy link

Fryguy commented Jan 7, 2026

@pointlessone please review - now that bigdecimal 4.0.x is released, ttfunk 1.8.0's dependency on bigdecimal ~>3.1 ends up causing bundler to regress ttfunk down to 1.7.0 which doesn't have the bigdecimal dependency, in order to satisfy the newer bigdecimal.

@flori
Copy link

flori commented Jan 17, 2026

I think it's safe to use v4 instead of v3 BigDecimal in this gem. At least it doesn't make things worse, because only the class is expected and that these numbers respond to #to_s. However, looking at the code in https://github.com/prawnpdf/ttfunk/blob/master/lib/ttfunk/table/cff/dict.rb#L143 I can see that it might not always work as expected, e. g. 0.00001.to_s # => "1.0e-05" and 1000000000000000.0.to_s # => "1.0e+15" for Floats or BigDecimals. Some form of "%f" % number or "%.10f" % number might be needed depending on the input.

@pointlessone
Copy link
Member

I'm delighted about all the activity. But I'm a bit in a pickle. Today I only had 2 hours of power, yesterday—4. And it doesn't look like I'm suddenly gonna have much more in the coming days. Once the situation becomes a little bit more predictable I'll look into it.

The main concern for this particular issue is that I haven't decided what Rubies to support for the next release. IIRC, I said the last release would be the last to support 2.7 but uh… Barely any Rubies of the last release are still supported. It might be a bit of stretch to have a release with a sudden huge jump in minimum Ruby version. So I'll have to look closer into that. But again, once things settle a bit. No time frame at the moment but I want to do it relatively soon, as circumstances allow.

@flori
Copy link

flori commented Jan 17, 2026

The main concern for this particular issue is that I haven't decided what Rubies to support for the next release. IIRC, I said the last release would be the last to support 2.7 but uh… Barely any Rubies of the last release are still supported. It might be a bit of stretch to have a release with a sudden huge jump in minimum Ruby version. So I'll have to look closer into that. But again, once things settle a bit. No time frame at the moment but I want to do it relatively soon, as circumstances allow.

This change just allows BigDecimal to be >=3 instead of just a 3.x version. Bundler resolves it for ruby 2.7 as 4.0.1, and the specs were green when I tried it. There's no need to change the required ruby version.

Screenshot 2026-01-17 at 20 54 40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants