steep icon indicating copy to clipboard operation
steep copied to clipboard

`seep checks` returns `Ruby::UnexpectedPositionalArgument`

Open ElectNewt opened this issue 2 years ago • 0 comments

Hello! first of all, I would like to say that I am quite new at ruby, so I might be doing something wrong.

But as far as I am aware, this should be fine. (on runtime works)

when running steep check I retrieve the following error:

Foo.rb:15:17: [error] Unexpected positional argument
│ Diagnostic ID: Ruby::UnexpectedPositionalArgument
│
└       block.call(args)

and this this is the code:

def execute_transaction(*args, &block)
    return if block.nil?

    @db.transaction do
      block.call(args)
    end
  end

and call is going to -> def call(*params) end inside ruby3.1 -> proc.rb; What am I doing wrong or how can we fix this?

ElectNewt avatar Sep 20 '22 11:09 ElectNewt