Project

General

Profile

Actions

Bug #1415

closed

Structがppできない

Added by rubikitch (rubikitch .) over 15 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]
Backport:
[ruby-dev:38349]

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 #1

Updated by nobu (Nobuyoshi Nakada) over 15 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r23301.
=end

Actions

Also available in: Atom PDF

Like0
Like0