- Notifications
You must be signed in to change notification settings - Fork99
Fix Ruby 2.7 warnings for the 1.2 branch#111
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
I've been working on fixing the warnings in the master branch for a 2.0.1 release. I'm planning to backport the fixes to the 1.2 branch for a 1.2.6 release. |
@philr that's great to hear. If my PR isn't useful I can close it, otherwise I can finish it to get a green CI. Let me know what you prefer. |
| defopen_file(file_name,mode,opts, &block) | ||
| ::File.open(file_name,mode,opts, &block) | ||
| end | ||
| ruby2_keywords:open_fileifrespond_to?(:ruby2_keywords,true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
/Users/kamipo/src/github.com/rails/rails/vendor/bundle/ruby/2.7.0/bundler/gems/tzinfo-71873adbf908/lib/tzinfo/ruby_core_support.rb:145: warning: Skipping set of ruby2_keywords flag for open_file (method accepts keywords or method does not accept argument splat)
We can only useruby2_keywords when method accepts splat arguments.
In this case probably we need extra version checkRUBY_VERSION >= '2.0' then::File.open(file_name, mode, **opts, &block).
Thanks for submitting this pull request. I've committed some changes to the 1.2 branch to resolve the warnings with Ruby 2.7. The implementation already in master took a different approach to that in this pull request (a refinement to replace There will be a 1.2.6 release soon. |
Most of these have been fixed on
master, however they were only pusblish in the 2.0 release.The issue is that I'm trying to fix warnings for the stable versions of Rails, so bumping tzinfo from a major version to another is complicated.
It would be much simpler if a
1.xcompatible with Ruby 2.7 was released.cc@kamipo@rafaelfranca@Edouard-chin