Skip to content

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

@yaauie

Description

@yaauie

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions