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
commit0c792a32b7e600320eb5eb3fd9e3ae1fe57e8b58 (patch)
tree499504866761bfcca6c3851493d8d345702aeecb /lib/set.rb
parent90d8cbb1ee3c7955642e1af995361eb0d9558aa9 (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/trunk@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
}
}