rbs
                                
                                
                                
                                    rbs copied to clipboard
                            
                            
                            
                        rbs prototype rbi misses comments for multiline sigs
In Sorbet you can have multiline sigs using do/end blocks, like so:
module Bar
  # This is a method.
  sig do
    params(x: Integer).void
  end
  def self.foo(x); end
end
When you use rbs prototype rbi on this signature to convert it to RBS, the comment doesn't get included in the RBS output:
module Bar
  def self.foo: (Integer x) -> void
end
I wrote a test to show this issue, if you want to use it:
  def test_comment_with_multiline_sig
    parser = RBI.new
    parser.parse <<-EOF
module Bar
  # This is a method.
  sig do
    params(x: Integer).void
  end
  def self.foo(x); end
end
    EOF
    assert_write parser.decls, <<-EOF
module Bar
  # This is a method.
  def self.foo: (Integer x) -> void
end
    EOF
  end