From 7dd70df4b014f4bd87e02641c60ecdd929b2797b Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 21 Jun 2006 08:20:12 +0000 Subject: * 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 --- lib/pp.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/pp.rb b/lib/pp.rb index 992369911d..266949e22b 100644 --- a/lib/pp.rb +++ b/lib/pp.rb @@ -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 -- cgit v1.2.3