Skip to content

Postitional Args failure in ruby 3.4 #452

@graial

Description

@graial

Greetings,

When trying to run softcover using ruby 3.4, I encountered:

gems/3.4.0/gems/thin-1.8.2/lib/rack/handler/thin.rb:11:in 'run': wrong number of arguments (given 2, expected 1) (ArgumentError)

I've found that if I tweak

gems/3.4.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1510
to include positional args, the server starts fine.
so from:
handler.run(self, server_settings) do |server|
to:
handler.run(*self, **server_settings) do |server|

I don't know where in the call chain this is most appropriately addressed so I've open similar tickets in Softcover - softcover/softcover#254 and
Sinatra - sinatra/sinatra#2143

I found the error using this article:
https://www.fastruby.io/blog/fix-sneaky-argument-error-when-upgrading-ruby.html

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions