From: Yoshimasa Niwa Date: 2009-08-21T02:56:16+09:00 Subject: [ruby-dev:39148] [Bug #1969] irb will be stuck with long variable name with completion.rb Bug #1969: irb will be stuck with long variable name with completion.rb http://redmine.ruby-lang.org/issues/show/1969 起票者: Yoshimasa Niwa ステータス: Open, 優先度: Normal ruby -v: ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9] Requiring "irb/completion", we then hit Tab after a long variable name, irb will be stuck. % irb irb(main):001:0> require 'irb/completion' => true irb(main):002:0> a.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[Hit Tab key] (Nothing happen, just eating CPU) irb(main):002:0> ::A::BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB[Hit Tab key] (Nothing happen, just eating CPU) I attached the patches to fix this issue. This issue seems to be caused by a problem of longest matching of regular expressions. These patches are based on Haruo Nanki 's good suggestions. irbでirb/completionがrequireされているときに、長い変数名、クラス名の後でTabを押すと固まります。 正規表現の最長一致の問題と思われます。 南木さんの指摘をもとに作成したパッチを添付しますのでご確認ください。 ---------------------------------------- http://redmine.ruby-lang.org