Project

General

Profile

Actions

Feature #2018

closed

[irb] BasicObject.new doesn't have an inspect

Added by DanielBovensiepen (Daniel Bovensiepen) about 15 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
[ruby-core:25200]

Description

=begin
Using BasicObject.new in irb:

daniel@boviAir# ruby19 --version
ruby 1.9.2dev (2009-08-30 trunk 24718) [i386-darwin9.8.0]
daniel@boviAir# irb19 --version
irb 0.9.6(09/06/30)
daniel@boviAir# irb19
irb(main):001:0> BasicObject.new

Produce an Exception due to the fact that inspect doesn't exist in the BasicObject:

NoMethodError: undefined method inspect' for #<BasicObject:0x4b2738> from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb/inspector.rb:84:in block in module:IRB'
from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb/inspector.rb:30:in call' from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb/inspector.rb:30:in inspect_value'
from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb/context.rb:259:in inspect_last_value' from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb.rb:309:in output_value'
from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb.rb:158:in block (2 levels) in eval_input' from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb.rb:271:in signal_status'
from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb.rb:154:in block in eval_input' from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb/ruby-lex.rb:244:in block (2 levels) in each_top_level_statement'
from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in loop' from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in block in each_top_level_statement'
from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in catch' from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in each_top_level_statement'
from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb.rb:153:in eval_input' from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb.rb:70:in block in start'
from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb.rb:69:in catch' from /Users/danielbovensiepen/Programs/ruby19/lib/ruby/1.9.1/irb.rb:69:in start'
from /Users/danielbovensiepen/Programs/ruby19/bin/irb19:12:in `'Maybe IRB bug!!

In the attachment is a patch for catching this exception.
=end


Files

basicobject_irb.patch (685 Bytes) basicobject_irb.patch Patch for catching inspect exception in irb DanielBovensiepen (Daniel Bovensiepen), 08/31/2009 02:43 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0