Actions
Bug #1415
closedStructがppできない
Description
=begin
Ruby 1.9.1で構造体をppするとエラーになります。
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 `'¶
=end
Actions
Like0
Like0