steep icon indicating copy to clipboard operation
steep copied to clipboard

Steep (RBS?) not aware of `IO.popen` block form

Open rgarner opened this issue 1 year ago • 1 comments

I'm having to put

hash[D::Ruby::UnexpectedBlockGiven] = :information

... in my Steepfile, as I am using the block form of IO.popen, which steep check flags as:

lib/snapbot/diagram/renderer.rb:21:46: [error] The method cannot be called with a block
│ Diagnostic ID: Ruby::UnexpectedBlockGiven
│
└         IO.popen("dot -Tsvg -o #{path}", "w") do |pipe|
                                                ~~~~~~~~~

Should Steep be able to deal with the block form of IO.popen?

I'm very, very new to RBS and Steep so I am aware I'm likely to be posting this in the wrong place! My apologies in advance for that.

rgarner avatar Aug 10 '22 12:08 rgarner

This seems to be (at least with rbs v2.6.0) a problem that need fixing in the https://github.com/ruby/rbs repository as the signature is:

  # io.rbs
  def self.popen: (*untyped args) -> untyped

rpiotaix-tc avatar Aug 27 '22 21:08 rpiotaix-tc