File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -601,15 +601,14 @@ def remove_breaks(node, replace = "; ")
601
601
# Adds a separated list.
602
602
# The list is separated by comma with breakable space, by default.
603
603
#
604
- # #seplist iterates the +list+ using +iter_method +.
604
+ # #seplist iterates the +list+ using +each +.
605
605
# It yields each object to the block given for #seplist.
606
606
# The procedure +separator_proc+ is called between each yields.
607
607
#
608
608
# If the iteration is zero times, +separator_proc+ is not called at all.
609
609
#
610
610
# If +separator_proc+ is nil or not given,
611
611
# +lambda { comma_breakable }+ is used.
612
- # If +iter_method+ is not given, :each is used.
613
612
#
614
613
# For example, following 3 code fragments has similar effect.
615
614
#
@@ -622,9 +621,9 @@ def remove_breaks(node, replace = "; ")
622
621
# xxx 2
623
622
# q.comma_breakable
624
623
# xxx 3
625
- def seplist ( list , sep = nil , iter_method = :each ) # :yield: element
624
+ def seplist ( list , sep = nil ) # :yield: element
626
625
first = true
627
- list . __send__ ( iter_method ) { |*v |
626
+ list . each { |*v |
628
627
if first
629
628
first = false
630
629
elsif sep
You can’t perform that action at this time.
0 commit comments