Bugs: Browse | Submit New | Admin

[#22576] "Can't convert nil into String" when using readline().

Date:
2008-10-27 09:41
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
"Can't convert nil into String" when using readline().

Detailed description
irb(main):001:0> require 'rcommand'
=> true
irb(main):002:0> r = RCommand.new(STDIN, STDOUT)
=> #<RCommand:0x2e369d8
@procs={:key_up=>#<Proc:0x02e44a60@c:/Soft/Ruby/lib/ruby/gems/1.8/gems/rcommand-0.2.0/lib/rcommand.rb:107>,
:completion=>#<Proc:0x02e45488@c:/Soft/Ruby/lib/ruby/gems/1.8/gems/rcommand-0.2.0/lib/rcommand.rb:85>,
:key_down=>#<Proc:0x02e448f8@c:/Soft/Ruby/lib/ruby/gems/1.8/gems/
rcommand-0.2.0/lib/rcommand.rb:110>, :key_left=>nil,
:single_tab=>#<Proc:0x02e4521c@c:/Soft/Ruby/lib/ruby/gems/1.8/gems/rcommand-0.2.0/lib/rcommand.rb:90>,
:interupt=>#<Proc:0x02e44574@c:/Soft/Ruby/lib/ruby/gems/1.8/gems/rcommand-0.2.0/lib/rcommand.rb:115>,
:double_tab=>#<Proc:0x02e44c2c@c:/Soft/Rub
y/lib/ruby/gems/1.8/gems/rcommand-0.2.0/lib/rcommand.rb:95>}, @io_write=#<IO:0x2946af4>, @history_index=nil,
@io_read=#<IO:0x2946b08>, @history=[], @io_method=#<RCommand::ReadlineIOMethod:0x2e368e8
@command_line=#<RCommand:0x2e369d8 ...>, @eof=false>>
irb(main):003:0> r.readline
TypeError: can't convert nil into String
        from c:/Soft/Ruby/lib/ruby/gems/1.8/gems/rcommand-0.2.0/lib/rcommand/io_methods.rb:238:in `readline'
        from c:/Soft/Ruby/lib/ruby/gems/1.8/gems/rcommand-0.2.0/lib/rcommand/io_methods.rb:238:in `readline'
        from c:/Soft/Ruby/lib/ruby/gems/1.8/gems/rcommand-0.2.0/lib/rcommand.rb:193:in `readline'
        from (irb):3
irb(main):004:0>

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item