[Bug #1415] Structがppできない


#1

Bug #1415: Structe$B$,e(Bppe$B$G$-$J$$e(B
http://redmine.ruby-lang.org/issues/show/1415

e$B5/I<<Te(B: rubikitch .
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
e$B%+%F%4%je(B: lib, Target version: 1.9.1
ruby -v: ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]

Ruby 1.9.1e$B$G9=B$BN$re(Bppe$B$9$k$H%(%i!<$K$J$j$^$9!#e(B

require pp
RUBY_VERSION # => 1.9.1
struct = Struct.new(:a).new(3) # => #
pp struct

~> /pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/pp.rb:364:in `+: cant

convert nil into String (TypeError)

~> from /pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/pp.rb:364:in

`pretty_print

~> from /pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/pp.rb:154:in `block

in pp

~> from

/pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/prettyprint.rb:200:in `block (2
levels) in group

~> from

/pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/prettyprint.rb:227:in `nest

~> from

/pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/prettyprint.rb:200:in `block in
group

~> from

/pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/prettyprint.rb:212:in
`group_sub

~> from

/pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/prettyprint.rb:199:in `group

~> from /pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/pp.rb:154:in `pp

~> from /pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/pp.rb:77:in `block

in pp

~> from /pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/pp.rb:121:in

`guard_inspect_key

~> from /pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/pp.rb:77:in `pp

~> from /pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/pp.rb:59:in `block

in pp

~> from /pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/pp.rb:59:in `each

~> from /pkgs/ruby-1.9.1-p0/lib/ruby191p0/1.9.1/pp.rb:59:in `pp

~> from -:4:in `


#2

e$B%A%1%C%He(B #1415 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r23301.

http://redmine.ruby-lang.org/issues/show/1415