[ruby/prism] Avoid unnecessary delete_prefix in LibRubyParser.resolve_type
Only remove const prefix from non-pointer types. https://github.com/ruby/prism/commit/97c9ffeb42
This commit is contained in:
parent
fe08839d8a
commit
55a0d2c63b
@ -25,8 +25,8 @@ module Prism
|
||||
# void -> :void
|
||||
#
|
||||
def self.resolve_type(type)
|
||||
type = type.strip.delete_prefix("const ")
|
||||
type.end_with?("*") ? :pointer : type.to_sym
|
||||
type = type.strip
|
||||
type.end_with?("*") ? :pointer : type.delete_prefix("const ").to_sym
|
||||
end
|
||||
|
||||
# Read through the given header file and find the declaration of each of the
|
||||
|
Loading…
x
Reference in New Issue
Block a user