wvanbergen / chunky_png

Read/write access to PNG images in pure Ruby.
https://chunkypng.com
MIT License
1.05k stars 101 forks source link

ruby3_2 fix: check if object responds to regex_match op #169

Open mtasaka opened 1 year ago

mtasaka commented 1 year ago

Maybe there is more clean solution, however anyway proposing the fix.

Object#=~ is already deprecated since ruby2.6 and will be removed from ruby3.2. As the result, Array no longer respond to =~ from ruby3.2, for example.

Check if the target object really respond to =~ .

Closes #168

UweKubosch commented 1 year ago

Any chance of getting this PR merged and released? It would enable use with Ruby 3.2+