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

Draper is incompatible with Ruby 3 #884

Closed
brian-kephart opened this issue May 7, 2020 · 5 comments
Closed

Draper is incompatible with Ruby 3 #884

brian-kephart opened this issue May 7, 2020 · 5 comments

Comments

@brian-kephart
Copy link

Similar to #869. My test suite spat this out:

gem_path/draper-4.0.1/lib/draper/helper_proxy.rb:32: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
gem_path/actionview-6.0.3/lib/action_view/helpers/translation_helper.rb:118: warning: The called method `l' is defined here

The referenced method in ActionView does indeed take keyword arguments. However, the Draper method that causes the warning doesn't appear to be using keyword arguments:

view_context.send(name, *args, &block)

This appears to be a delegation issue as described here. I'm not well-up on delegation techniques or Draper usage, so I won't be submitting a PR for this myself. Hopefully someone else can shed some light on the issue.

@kulas115
Copy link

Seeing the same warning coming from draper-4.0.1/lib/draper/automatic_delegation.rb:12.

@zeeshangulzar
Copy link

zeeshangulzar commented Sep 23, 2020

I am getting same warning with following Tech Stack
Ruby: 2.7.1
Rails 6.0.3.3
Draper: 4.0.1


/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/actionview-6.0.3.3/lib/action_view/helpers/translation_helper.rb:60: warning: The called method t is defined here```

@brian-kephart brian-kephart changed the title Ruby 2.7 keyword argument deprecation Draper is incompatible with Ruby 3 Dec 27, 2020
@brian-kephart
Copy link
Author

Updated the issue title. The deprecations in Ruby 2.7 weren't fixed, so Draper doesn't work with 3.0.

@tbuehlmann
Copy link
Contributor

Addressed this in #894.

@brian-kephart
Copy link
Author

Fixed in #885

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

Successfully merging a pull request may close this issue.

4 participants