Skip to content

Commit

Permalink
Merge pull request #1691 from Maumagnaguagno/ffi_resolve_type
Browse files Browse the repository at this point in the history
Avoid unnecessary delete_prefix in LibRubyParser.resolve_type
  • Loading branch information
eregon authored Oct 16, 2023
2 parents 7935597 + 97c9ffe commit b309d3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/prism/ffi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ module LibRubyParser
# 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
Expand Down

0 comments on commit b309d3e

Please sign in to comment.