mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
* lib/pp.rb (Struct#pretty_print): coerce to a string since
anonymous class has name no longer. [ruby-dev:38349] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fbcde451c5
commit
46f23b51f6
3 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue