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

Commit 1ce3d1f

Browse files
eileencodeskddnewton
authored andcommitted
remove iter_method arg
1 parent 81823ba commit 1ce3d1f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/syntax_tree/prism/prettier_print.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -601,15 +601,14 @@ def remove_breaks(node, replace = "; ")
601601
# Adds a separated list.
602602
# The list is separated by comma with breakable space, by default.
603603
#
604-
# #seplist iterates the +list+ using +iter_method+.
604+
# #seplist iterates the +list+ using +each+.
605605
# It yields each object to the block given for #seplist.
606606
# The procedure +separator_proc+ is called between each yields.
607607
#
608608
# If the iteration is zero times, +separator_proc+ is not called at all.
609609
#
610610
# If +separator_proc+ is nil or not given,
611611
# +lambda { comma_breakable }+ is used.
612-
# If +iter_method+ is not given, :each is used.
613612
#
614613
# For example, following 3 code fragments has similar effect.
615614
#
@@ -622,9 +621,9 @@ def remove_breaks(node, replace = "; ")
622621
# xxx 2
623622
# q.comma_breakable
624623
# xxx 3
625-
def seplist(list, sep=nil, iter_method=:each) # :yield: element
624+
def seplist(list, sep = nil) # :yield: element
626625
first = true
627-
list.__send__(iter_method) {|*v|
626+
list.each {|*v|
628627
if first
629628
first = false
630629
elsif sep

0 commit comments

Comments
 (0)