We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4c8dfd commit 72324f1Copy full SHA for 72324f1
lib/syntax_tree/prism/prettier_print.rb
@@ -193,7 +193,7 @@ class LineSuffix
193
194
attr_reader :priority, :contents
195
196
- def initialize(priority: DEFAULT_PRIORITY, contents: [])
+ def initialize(priority, contents)
197
@priority = priority
198
@contents = contents
199
end
@@ -834,10 +834,11 @@ def indent
834
# Inserts a LineSuffix node into the print tree. The contents of the node are
835
# determined by the block.
836
def line_suffix(priority: LineSuffix::DEFAULT_PRIORITY)
837
- doc = LineSuffix.new(priority: priority)
+ contents = []
838
+ doc = LineSuffix.new(priority, contents)
839
target << doc
840
- with_target(doc.contents) { yield }
841
+ with_target(contents) { yield }
842
doc
843
844
0 commit comments