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

Ruby >2.4.0 required #1

Closed
zhilton opened this issue Apr 18, 2019 · 3 comments
Closed

Ruby >2.4.0 required #1

zhilton opened this issue Apr 18, 2019 · 3 comments

Comments

@zhilton
Copy link

zhilton commented Apr 18, 2019

As of release 2.0.8, Louis utilizes functionality only available in Ruby >2.4.0. The required minimum language should be updated to reflect this.

This is due (at least in part) to the use of Hash#compact in lib/louis.rb on lines 35 and 40, an attribute not added to Ruby until 2.4.0. See related thread for BlueHydra pwnieexpress/blue_hydra#131.

@sstelfox
Copy link
Owner

I've always strived to maintain compatibility with all supported versions of Ruby. Versions of Ruby before 2.4 have not been supported for a while, and 2.4 itself is currently being sunset. There are a lot of unpatched issues in earlier versions of Ruby and I strongly encourage you to upgrade.

That being said it is easy enough to workaround not using #compact, and I've already released a version (2.1.4) that switches to #reject to accomplished the same thing. You can see that change here.

Could you test and see if this solves your issue?

@zhilton
Copy link
Author

zhilton commented Apr 18, 2019

This appears to fix the issue I was experiencing, though is far more than I expected from you, much appreciated! I was more looking for updating the readme and/or gemfile to list the language requirement. As you said, projects should upgrade by now, so this should fall on them, not you.

I was using BlueHydra earlier on a Raspberry Pi with minimal configuration and noticed an issue on their end (sort of) from this. Raspberry Pi installs Ruby 2.3.3 by default with apt install ruby-dev, which yes, is very much out of date. BlueHydra pulls the latest version of your gem and runs it, but BlueHydra claims a language dependency of Ruby 2.1, making it work out of the box with a Pi, in theory. Your latest improvements seem to have broken their claim and made it Ruby 2.4.0, breaking their software if you install it the way they currently have in the readme on a Pi. I wouldn't say this is even your problem, but figured you may want to document the new minimal requirement. Though I do greatly appreciate both the rapid response and the improved backward compatibility.

@sstelfox
Copy link
Owner

Happy to help! Glad this solution worked out. I will update the gemspec definition with a minimal Ruby version but that is likely much lower now (can't hurt right?). I'll throw that on my TODO list for tomorrow but for now as it seems to have solved your issue I'm going to close this ticket.

Even if you're only indirectly using my gem I appreciate the time you took to identify and report the issue. It's always nice to know your code is being used hahah.

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