Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/herb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ module Herb

module Herb
class << self
#: (String path, ?arena_stats: bool) -> LexResult
#: (String path, ?arena_stats: bool, **untyped) -> LexResult

@marcoroth marcoroth Aug 4, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in #1989 (comment), we probably want to remove the **untyped and enumerate all kwargs again in the actual method declaration:

#: (String path, ?arena_stats: bool) -> LexResult
def lex_file(path, arena_stats: nil)
  lex(File.read(path), arena_stats:)
end

I wish there was a way around this.

def lex_file(path, **)
lex(File.read(path), **)
end

#: (String path, ?track_whitespace: bool, ?analyze: bool, ?strict: bool, ?action_view_helpers: bool, ?transform_conditionals: bool, ?strict_locals: bool, ?prism_nodes: bool, ?prism_nodes_deep: bool, ?prism_program: bool, ?arena_stats: bool) -> ParseResult
#: (String path, ?track_whitespace: bool, ?analyze: bool, ?strict: bool, ?action_view_helpers: bool, ?transform_conditionals: bool, ?strict_locals: bool, ?prism_nodes: bool, ?prism_nodes_deep: bool, ?prism_program: bool, ?arena_stats: bool, **untyped) -> ParseResult
def parse_file(path, **)
parse(File.read(path), **)
end
Expand Down
8 changes: 4 additions & 4 deletions sig/herb.rbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading