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

Fix deprecation warning for Ruby 2.7 in base.rb. #660

Merged
merged 2 commits into from Dec 27, 2019

Conversation

@connorshea
Copy link
Contributor

connorshea commented Dec 27, 2019

Resolves #659. This causes a new deprecation warning in sprockets-rails, but I'm opening a PR in sprockets-rails to fix that next.

@connorshea

This comment has been minimized.

Copy link
Contributor Author

connorshea commented Dec 27, 2019

rails/sprockets-rails#454 actually may be the only PR that needs to be merged here. The deprecation warning is fixed by the change in sprockets-rails regardless of whether this change is present.

That said, if the deprecation warning weren't fixed in sprockets, I wouldn't have known that there was a problem in sprockets-rails. So I think this might be worth fixing to make it easier to determine the true source of deprecation warnings in other gems.

@@ -115,8 +115,8 @@ def find_all_linked_assets(*args)
#
# environment['application.js']
#
def [](*args)
find_asset(*args)
def [](*args, **options)

This comment has been minimized.

Copy link
@rafaelfranca

rafaelfranca Dec 27, 2019

Member

The spockets-rails method call should not raise any warning since it is passing a hash as second argument, not keyword arguments.

This comment has been minimized.

Copy link
@rafaelfranca

rafaelfranca Dec 27, 2019

Member

Ah, I see. It is because find_asset is doing the split.

@rafaelfranca rafaelfranca merged commit b1d2da8 into rails:master Dec 27, 2019
3 checks passed
3 checks passed
build
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@connorshea connorshea deleted the connorshea:ruby-27-deprecation-fixes branch Dec 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.