# \[Bug #1415\] Struct$B$,(Bpp$B$G$-$J$$(B

**URL:** <https://www.ruby-forum.com/t/bug-1415-struct-b-bpp-b-g-j-b/166614>\
**Category:** Development\
**Created:** [April 27, 2009, 9:49pm UTC](https://www.ruby-forum.com/t/bug-1415-struct-b-bpp-b-g-j-b/166614 "2009-04-27T21:49:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubikitch\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/46a35a/32.png) [@rubikitch\_S](https://www.ruby-forum.com/u/rubikitch_S)\
**Post date:** [April 27, 2009, 9:49pm UTC](https://www.ruby-forum.com/t/bug-1415-struct-b-bpp-b-g-j-b/166614/1 "2009-04-27T21:49:12Z")

</div>

Bug #1415: Structe$B$,e(Bppe$B$G$-$J$$e(B  
[http://redmine.ruby-lang.org/issues/show/1415](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 `+': can’t

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 `’

---

<div class="post-metadata">

**Author:** ![rubikitch\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/46a35a/32.png) [@rubikitch\_S](https://www.ruby-forum.com/u/rubikitch_S)\
**Post date:** [April 28, 2009, 12:18am UTC](https://www.ruby-forum.com/t/bug-1415-struct-b-bpp-b-g-j-b/166614/2 "2009-04-28T00:18:16Z")

</div>

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](http://redmine.ruby-lang.org/issues/show/1415)
