summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-27 22:13:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-27 22:13:50 +0000
commit8d428ed951fefccf452c7c7abb485f4bc1131cb3 (patch)
tree79a8a100faba6ffda880b5418f5b393e5cbce389 /lib
parentd9cbb610314aeaac03191e56ed6affd392f41095 (diff)
downloadruby-8d428ed951fefccf452c7c7abb485f4bc1131cb3.tar.gz
ruby-8d428ed951fefccf452c7c7abb485f4bc1131cb3.tar.xz
ruby-8d428ed951fefccf452c7c7abb485f4bc1131cb3.zip
* lib/pp.rb (Struct#pretty_print): coerce to a string since
anonymous class has name no longer. [ruby-dev:38349] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/pp.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pp.rb b/lib/pp.rb
index d7425cd5f..e28875c8e 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -361,7 +361,7 @@ end
class Struct
def pretty_print(q)
- q.group(1, '#<struct ' + PP.mcall(self, Kernel, :class).name, '>') {
+ q.group(1, sprintf("#<struct %s", PP.mcall(self, Kernel, :class).name), '>') {
q.seplist(PP.mcall(self, Struct, :members), lambda { q.text "," }) {|member|
q.breakable
q.text member.to_s