Skip to content

Fix Renderer errors with --enable-frozen-string-literal#244

Open
anthonykaufman wants to merge 1 commit into
boazsegev:masterfrom
anthonykaufman:frozen-string-literal-errors
Open

Fix Renderer errors with --enable-frozen-string-literal#244
anthonykaufman wants to merge 1 commit into
boazsegev:masterfrom
anthonykaufman:frozen-string-literal-errors

Conversation

@anthonykaufman
Copy link
Copy Markdown

@anthonykaufman anthonykaufman commented Nov 18, 2024

There were several instances in which adding .b to string literals was necessary to not throw this error when --enable-frozen-string-literal was enabled.

To reproduce I used Ruby 2.7.8 with the --enable-frozen-string-literal option enabled:

$ git checkout frozen-string-literal-errors
$ rbenv local 2.7.8
$ git checkout master -- lib/combine_pdf/renderer.rb
$ rake RUBYOPT="--enable-frozen-string-literal --debug-frozen-string-literal" test

You should get 3 test errors.

@boazsegev
Copy link
Copy Markdown
Owner

Hi,

I'm sorry I missed this. Did the 1.0.29 version fix this issue, or do I still need to fix and merge?

Thanks.
B.

There were several instances in which adding .b to string literals was
necessary to not throw this error when --enable-frozen-string-literal
was enabled. Exposed with tests.
@anthonykaufman anthonykaufman force-pushed the frozen-string-literal-errors branch from 70e51ab to a30667c Compare December 6, 2024 18:05
@anthonykaufman
Copy link
Copy Markdown
Author

No worries!

I rebased on master and without the changes I made to lib/combine_pdf/renderer.rb in the PR, I'm still failing the tests I created to expose the issue.

@Markus-Munk-Shipmondo
Copy link
Copy Markdown

@anthonykaufman any news on this PR? I could really use it.
Great work

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants