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

Frozen string literal usage unsupported in Ruby 1.9.x #149

Closed
shiivan opened this issue Oct 23, 2020 · 1 comment
Closed

Frozen string literal usage unsupported in Ruby 1.9.x #149

shiivan opened this issue Oct 23, 2020 · 1 comment

Comments

@shiivan
Copy link

shiivan commented Oct 23, 2020

The latest release v1.3.13 contained this PR change: https://github.com/wvanbergen/chunky_png/pull/147/files#diff-aeb7019729c0cb42388238cf56a1c86146cc275eafa5727205ba81604fc034eeR146

This doesn't appear to work in some of the gems stated supported Ruby versions of 1.9.x

Error in wild:

21:12:20 /var/lib/gems/1.9.1/gems/chunky_png-1.3.13/lib/chunky_png.rb:146:in `<module:ChunkyPNG>': undefined method `b' for "\x00":String (NoMethodError)
21:12:20 	from /var/lib/gems/1.9.1/gems/chunky_png-1.3.13/lib/chunky_png.rb:25:in `<top (required)>'

Simple irb reproduction:

irb(main):001:0> # frozen-string-literal: true
irb(main):002:0* EXTRA_BYTE = "\0".b
NoMethodError: undefined method `b' for "\u0000":String
        from (irb):2
        from /usr/bin/irb:12:in `<main>'
@wvanbergen
Copy link
Owner

wvanbergen commented Oct 24, 2020

I have updated the wiki to state only currrently supported versions of Ruby (which right now is Ruby 2.5+) are tested against, and supported by ChunkyPNG.

Ruby 1.9 went out of support 5 years ago: https://www.ruby-lang.org/en/news/2015/02/23/support-for-ruby-1-9-3-has-ended/. I do not plan to support it. If you are stuck on Ruby 1.9, pin your ChunkyPNG version on a version that works for you.

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

No branches or pull requests

2 participants