Skip to content

Commit 263fc5c

Browse files
authored
Merge pull request #25 from ruby-go-gem/fix_steep
Fix `Ruby::UnannotatedEmptyCollection` in `steep check`
2 parents 9415cb2 + c564c94 commit 263fc5c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/ruby_header_parser/parser.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,11 @@ def extract_type_definitions
9393
def extract_enum_definitions
9494
stdout = execute_ctags("--c-kinds=e --fields=+n")
9595

96+
# Workaround for Ruby::UnannotatedEmptyCollection on steep 1.9.0+
97+
name_to_definition = {} #: Hash[String, RubyHeaderParser::EnumDefinition] # rubocop:disable Layout/LeadingCommentSpace
98+
9699
name_to_definitions =
97-
stdout.each_line.with_object({}) do |line, hash|
100+
stdout.each_line.with_object(name_to_definition) do |line, hash|
98101
parts = line.split("\t")
99102

100103
enum_name = Util.find_field(parts, "enum")

0 commit comments

Comments
 (0)