Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
casperisfine wants to merge5 commits intotzinfo:1.2fromShopify:fix-warnings-on-1.2

Conversation

@casperisfine
Copy link

Most of these have been fixed onmaster, 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 a1.x compatible with Ruby 2.7 was released.

cc@kamipo@rafaelfranca@Edouard-chin

@philr
Copy link
Member

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.

@casperisfine
Copy link
Author

@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)
Copy link
Contributor

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).

@philr
Copy link
Member

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 replaceObject#untaint). I decided to make the 1.2 branch follow the same path.

There will be a 1.2.6 release soon.

@philrphilr closed thisDec 23, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@kamipokamipokamipo left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@casperisfine@philr@kamipo@byroot

[8]ページ先頭

©2009-2025 Movatter.jp