From a48c27d6339ef13fa010f0f721e47ca60bd10e9f Mon Sep 17 00:00:00 2001 From: ydah Date: Sun, 15 Dec 2024 10:33:06 +0900 Subject: [PATCH] Fix a warning for Ruby::UnannotatedEmptyCollection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` lib/lrama/grammar.rb:385:15: [warning] Empty array doesn't have type annotation │ Diagnostic ID: Ruby::UnannotatedEmptyCollection │ └ errors = [] ~~ ``` --- lib/lrama/grammar.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lrama/grammar.rb b/lib/lrama/grammar.rb index 3724f828..ee57b3c5 100644 --- a/lib/lrama/grammar.rb +++ b/lib/lrama/grammar.rb @@ -382,7 +382,7 @@ def fill_sym_to_rules end def validate_rule_lhs_is_nterm! - errors = [] + errors = [] #: Array[String] rules.each do |rule| next if rule.lhs.nterm?