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

2.2.0 regression in JRuby handling of inherited Sinatra::Base keyword args #1749

Closed
yaauie opened this issue Feb 16, 2022 · 2 comments · Fixed by #1750
Closed

2.2.0 regression in JRuby handling of inherited Sinatra::Base keyword args #1749

yaauie opened this issue Feb 16, 2022 · 2 comments · Fixed by #1750

Comments

@yaauie
Copy link

yaauie commented Feb 16, 2022

#1670 provides a fix to move forward with Ruby 3.0's Keyword arguments, but it comes at the expense of breaking Sinatra when run under JRuby.

ArgumentError: wrong number of arguments (given 3, expected 1..2)

With backtrace

/usr/share/logstash/logstash-core/lib/logstash/api/modules/base.rb:43:in `initialize'
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/sinatra-2.2.0/lib/sinatra/base.rb:1537:in `new'
/usr/share/logstash/logstash-core/lib/logstash/api/rack_app.rb:113:in `block in app'
...

I have filed a separate bug upstream with jruby (jruby/jruby#7102), but am hoping we can find a path foward here in Sinatra while we wait for JRuby to come up with a fix.

dentarg added a commit to dentarg/sinatra that referenced this issue Feb 16, 2022
@dentarg
Copy link
Member

dentarg commented Feb 16, 2022

@yaauie can you try #1750?

@yaauie
Copy link
Author

yaauie commented Feb 17, 2022

I answered over on #1750 that it resolves the situation for Logstash.

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.

2 participants