Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 72324f1

Browse files
eileencodeskddnewton
authored andcommitted
remove kwargs from line suffix
1 parent e4c8dfd commit 72324f1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/syntax_tree/prism/prettier_print.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class LineSuffix
193193

194194
attr_reader :priority, :contents
195195

196-
def initialize(priority: DEFAULT_PRIORITY, contents: [])
196+
def initialize(priority, contents)
197197
@priority = priority
198198
@contents = contents
199199
end
@@ -834,10 +834,11 @@ def indent
834834
# Inserts a LineSuffix node into the print tree. The contents of the node are
835835
# determined by the block.
836836
def line_suffix(priority: LineSuffix::DEFAULT_PRIORITY)
837-
doc = LineSuffix.new(priority: priority)
837+
contents = []
838+
doc = LineSuffix.new(priority, contents)
838839
target << doc
839840

840-
with_target(doc.contents) { yield }
841+
with_target(contents) { yield }
841842
doc
842843
end
843844

0 commit comments

Comments
 (0)