From 1ccce8a237eb67e66fedc1797676d0d58365f12d Mon Sep 17 00:00:00 2001 From: domingo2000 Date: Tue, 4 Aug 2026 01:10:26 -0400 Subject: [PATCH] Linter CLI: fix RBS signatures of lex_file and parse_file With his we prevent having issues with tapioca rbi generation because of the invalid RBS for this method omitting the ** argument --- lib/herb.rb | 4 ++-- sig/herb.rbs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/herb.rb b/lib/herb.rb index f0e06e039..675744ec8 100644 --- a/lib/herb.rb +++ b/lib/herb.rb @@ -80,12 +80,12 @@ module Herb module Herb class << self - #: (String path, ?arena_stats: bool) -> LexResult + #: (String path, ?arena_stats: bool, **untyped) -> LexResult 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 diff --git a/sig/herb.rbs b/sig/herb.rbs index 7aae701c9..63780b1ce 100644 --- a/sig/herb.rbs +++ b/sig/herb.rbs @@ -7,11 +7,11 @@ module Herb end module Herb - # : (String path, ?arena_stats: bool) -> LexResult - def self.lex_file: (String path, ?arena_stats: bool) -> LexResult + # : (String path, ?arena_stats: bool, **untyped) -> LexResult + def self.lex_file: (String path, ?arena_stats: bool, **untyped) -> LexResult - # : (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 - def self.parse_file: (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 self.parse_file: (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 # : (String source) -> Prism::ParseResult def self.parse_ruby: (String source) -> Prism::ParseResult