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

Deprecating warning with Ruby with positional/keyword arguments #257

Closed
ggrossetie opened this issue May 10, 2021 · 4 comments · Fixed by #260
Closed

Deprecating warning with Ruby with positional/keyword arguments #257

ggrossetie opened this issue May 10, 2021 · 4 comments · Fixed by #260

Comments

@ggrossetie
Copy link
Member

This warning can be seen on GitLab CI:

DEPRECATION WARNING: /builds/gitlab-org-forks/gitlab/vendor/ruby/2.7.0/gems/asciidoctor-2.0.15/lib/asciidoctor/extensions.rb:1398: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/builds/gitlab-org-forks/gitlab/vendor/ruby/2.7.0/gems/asciidoctor-kroki-0.4.0/lib/asciidoctor/extensions/asciidoctor_kroki/extension.rb:22: warning: The called method `initialize' is defined here

https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/

It's related to:

https://github.com/Mogztter/asciidoctor-kroki/blob/ba0a88c31b606e955c3d26e7cb093cff9e121b87/ruby/lib/asciidoctor/extensions/asciidoctor_kroki/extension.rb#L22

Dan Allen suggested that we move the logger fallback assignment into the initialize method because we are mixing hash argument (config) with keyword argument (logger).

@ggrossetie
Copy link
Member Author

@mttkay
Copy link

mttkay commented Jul 5, 2021

@Mogztter Thank you for fixing this! This hasn't made it in any release yet has it? Would it be possible to cut a new release that includes this fix? We are looking to support Ruby 3 in GitLab and are currently blocked by this issue: https://gitlab.com/gitlab-org/gitlab/-/issues/328031 (among many other similar issues 🙃)

@ggrossetie
Copy link
Member Author

@mttkay Sure, I just released version 0.5.0:

@mttkay
Copy link

mttkay commented Jul 6, 2021

Thank you! 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants