diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-21 08:20:12 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-21 08:20:12 +0000 |
commit | 7dd70df4b014f4bd87e02641c60ecdd929b2797b (patch) | |
tree | 7d6cd1b77f0a2dcc9dfe87d8d12b9a844fceea43 | |
parent | 2ca2a4a43bb018bfd84fccc75e395c1f0e58acc6 (diff) | |
download | ruby-7dd70df4b014f4bd87e02641c60ecdd929b2797b.tar.gz |
* lib/pp.rb (PP::PPMethods::seplist): should have preserved
original reference to the array. [ruby-dev:28747]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/pp.rb | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Wed Jun 21 17:18:55 2006 Yukihiro Matsumoto <matz@ruby-lang.org> + + * lib/pp.rb (PP::PPMethods::seplist): should have preserved + original reference to the array. [ruby-dev:28747] + Wed Jun 21 14:35:06 2006 Yukihiro Matsumoto <matz@ruby-lang.org> * parse.y (block_param): do not use multiple assignment for a sole @@ -143,7 +143,7 @@ class PP < PrettyPrint # printed, a.k.a the object reference chain has a cycle. def pp(obj) id = obj.__id__ - + if check_inspect_key(id) group {obj.pretty_print_cycle self} return @@ -220,13 +220,13 @@ class PP < PrettyPrint def seplist(list, sep=nil, iter_method=:each) # :yield: element sep ||= lambda { comma_breakable } first = true - list.__send__(iter_method) {|*v| + list.__send__(iter_method) {|v| if first first = false else sep.call end - yield(*v) + yield(v) } end |