mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/pp.rb (PP::PPMethods::seplist): revert last change to work
around wrapper bug. [ruby-dev:30840] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
931614a341
commit
8ef2289a49
2 changed files with 8 additions and 3 deletions
|
@ -1,4 +1,9 @@
|
||||||
Tue Jun 05 14:11:15 2007 NARUSE, Yui <naruse@ruby-lang.org>
|
Tue Jun 5 14:47:52 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/pp.rb (PP::PPMethods::seplist): revert last change to work
|
||||||
|
around wrapper bug. [ruby-dev:30840]
|
||||||
|
|
||||||
|
Tue Jun 5 14:11:15 2007 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* ext/nkf/nkf-utf8/nkf.c (kanji_convert): Fix guess fallback.
|
* ext/nkf/nkf-utf8/nkf.c (kanji_convert): Fix guess fallback.
|
||||||
|
|
||||||
|
|
|
@ -220,13 +220,13 @@ class PP < PrettyPrint
|
||||||
def seplist(list, sep=nil, iter_method=:each) # :yield: element
|
def seplist(list, sep=nil, iter_method=:each) # :yield: element
|
||||||
sep ||= lambda { comma_breakable }
|
sep ||= lambda { comma_breakable }
|
||||||
first = true
|
first = true
|
||||||
list.__send__(iter_method) {|v|
|
list.__send__(iter_method) {|*v|
|
||||||
if first
|
if first
|
||||||
first = false
|
first = false
|
||||||
else
|
else
|
||||||
sep.call
|
sep.call
|
||||||
end
|
end
|
||||||
yield(v)
|
yield(*v)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue