summaryrefslogtreecommitdiff
path: root/lib/set.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-05 14:59:46 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-05 14:59:46 +0000
commit9f45dc126cc461b78984383f4c15bfdc80b1f6d5 (patch)
tree7e25fe244595c7850d5bf03a30ee5520e76eddae /lib/set.rb
parentc3c6d7cbca3ec28f2f9133f2fd1d5c158c8a0929 (diff)
* lib/prettyprint.rb (PrettyPrint#seplist): added.
* lib/pp.rb (PPMethods#pp_object): use seplist. (PPMethods#pp_hash): ditto. (Array#pretty_print): ditto. (Struct#pretty_print): ditto. (MatchData#pretty_print): ditto. * lib/set.rb (Set#pretty_print): use seplist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/set.rb')
-rw-r--r--lib/set.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/set.rb b/lib/set.rb
index a19a4f3b55..e9c6931b14 100644
--- a/lib/set.rb
+++ b/lib/set.rb
@@ -418,14 +418,7 @@ class Set
def pretty_print(pp) # :nodoc:
pp.text sprintf('#<%s: {', self.class.name)
pp.nest(1) {
- first = true
- each { |o|
- if first
- first = false
- else
- pp.text ","
- pp.breakable
- end
+ pp.seplist(self) { |o|
pp.pp o
}
}