Skip to content

Commit 0eda078

Browse files
committed
Resolve conflict for Prism::Translation::Parser#initialize
#3443 and #3478 conflicted, resulting in different `initialize` method definitions. This PR resolves the conflict and updates it to a unified `initialize` method.
1 parent 35dceb5 commit 0eda078

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/prism/translation/parser.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,10 @@ def initialize(message, level, reason, location)
3131
end
3232
end
3333

34-
# Create the parser with our custom builder class
35-
def initialize(builder = Parser::Builder.new)
36-
super
37-
end
38-
3934
Racc_debug_parser = false # :nodoc:
4035

36+
# The `builder` argument is used to create the parser using a custom builder class by default.
37+
#
4138
# By using the `:parser` keyword argument, you can translate in a way that is compatible with
4239
# the Parser gem using any parser.
4340
#
@@ -61,7 +58,7 @@ def initialize(builder = Parser::Builder.new)
6158
# In an object passed to the `:parser` keyword argument, the `parse` and `parse_lex` methods
6259
# should be implemented as needed.
6360
#
64-
def initialize(builder = ::Parser::Builders::Default.new, parser: Prism)
61+
def initialize(builder = Parser::Builder.new, parser: Prism)
6562
@parser = parser
6663

6764
super(builder)

0 commit comments

Comments
 (0)