lib/rbi/parser.rb in rbi-0.1.13 vs lib/rbi/parser.rb in rbi-0.1.14
- old
+ new
@@ -2,11 +2,11 @@
# frozen_string_literal: true
require "prism"
module RBI
- class ParseError < StandardError
+ class ParseError < Error
extend T::Sig
sig { returns(Loc) }
attr_reader :location
@@ -15,11 +15,11 @@
super(message)
@location = location
end
end
- class UnexpectedParserError < StandardError
+ class UnexpectedParserError < Error
extend T::Sig
sig { returns(Loc) }
attr_reader :last_location
@@ -717,10 +717,10 @@
type = node_string!(type_arg)
loc = node_loc(send)
comments = node_comments(send)
default_value = T.let(nil, T.nilable(String))
- rest&.each do |arg|
+ rest.each do |arg|
next unless arg.is_a?(Prism::KeywordHashNode)
arg.elements.each do |assoc|
next unless assoc.is_a?(Prism::AssocNode)