Bug #7632

IRB autocompletion bug

Added by Bogdan Gusiev over 1 year ago. Updated over 1 year ago.

[ruby-core:51174]
Status:Closed
Priority:Normal
Assignee:Keiju Ishitsuka
Category:-
Target version:-
ruby -v:2.0.0 Backport:

Description

Steps to reproduce:
* Launch IRB
* type: (&:)
* press tab

Result: irb crashes
Ruby version: ruby-1.9.3-p194

/Users/bogdan/.rvm/gems/ruby-1.9.3-p194/gems/wirble-0.1.3/lib/wirble.rb:95:in save_history': undefined methodsize' for nil:NilClass (NoMethodError)
from /Users/bogdan/.rvm/gems/ruby-1.9.3-p194/gems/wirble-0.1.3/lib/wirble.rb:119:in block in initialize'
/Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/completion.rb:80:in
block in module:InputCompletor': unmatched close parenthesis: /:)/ (RegexpError)
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/input-method.rb:115:in call'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/input-method.rb:115:in
readline'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/input-method.rb:115:in gets'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:139:in
block (2 levels) in evalinput'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:273:in signal_status'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:138:in
block in eval
input'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:188:in call'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:188:in
bufinput'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:103:in getc'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/slex.rb:205:in
match
io'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/slex.rb:75:in match'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:286:in
token'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:262:in lex'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:233:in
block (2 levels) in eachtoplevelstatement'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in loop'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in
block in each
toplevelstatement'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in catch'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in
eachtoplevel_statement'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:155:in eval_input'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:70:in
block in start'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:69:in catch'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:69:in
start'
from /Users/bogdan/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `'

Associated revisions

Revision 38656
Added by Keiju Ishitsuka over 1 year ago

  • lib/irb/completion.rb: treat rightly comletion for symbol on irb [Bug #7632].

History

#1 Updated by Eric Hodel over 1 year ago

Can you reproduce without wirble?

#2 Updated by Zachary Scott over 1 year ago

I was able to reproduce it with a previous patch level version of 1.9.3 as well as p362

https://gist.github.com/4400982

#3 Updated by Shota Fukumori over 1 year ago

  • Tracker changed from Backport to Bug
  • Project changed from Backport93 to ruby-trunk

を見て移動します。

#4 Updated by Keiju Ishitsuka over 1 year ago

  • Status changed from Open to Assigned
  • Assignee set to Keiju Ishitsuka
  • ruby -v set to 2.0.0

#5 Updated by Keiju Ishitsuka over 1 year ago

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

This issue was solved with changeset r38656.
Bogdan, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/irb/completion.rb: treat rightly comletion for symbol on irb [Bug #7632].

#6 Updated by Keiju Ishitsuka over 1 year ago

けいじゅ@いしつかです.

In the message: " Re: backport93から
の移動 [Re: [Backport93 - Backport #7632] IRB
autocompletion bug]", on Dec/29 21:51(JST) "Shota Fukumori (sora_h)"
writes:

sora_hです。

このような場合, このチケットのプロジェクトをruby-trunkに変えてから, バ
グ修正をruby-trunkのリポジトリに登録した方がよいかと思ったのですが, プ
ロジェクトの変更ができませんでした.

権限関係なのかわかりませんが、こちらでは移動できたので移動しておきま
した。

あれ? やり方が悪かったのかなぁ??
それはともかく, ありがとうございました.

__
---------------------------------------------------->> 石塚 圭樹 <<---
---------------------------------->> e-mail: keiju@ishitsuka.com <<---

Also available in: Atom PDF