Bug #1145

IRB adds trailing quote to wtring methods when performing auto-completion

Added by C I about 6 years ago. Updated over 2 years ago.

[ruby-core:22018]
Status:Closed
Priority:Normal
Assignee:Keiju Ishitsuka
ruby -v:ruby 1.8.7 (2008-08-11 patchlevel 72) [powerpc-darwin8] Backport:

Description

=begin
IRB adds a trailing quote to some method names when performing an autocompletion. IRB does this for single quote and double quote string literals.
Not all methods are effected (for example '.delete' is fine) but at least the following are: .length, .size, .inspect, .to_i

Steps to replicate:
1. Enable autocompletion by adding the following line to your ~/.irbrc:
require 'irb/completion'

  1. Type any string literal, a period, and the characters 'len' to indicate the 'length' method

  2. Press tab

To illustrate:
power-mac-g4:~ $ irb
irb(main):001:0> 'test'.len
.....becomes...
irb(main):001:0> 'test'.length'
=end

Associated revisions

Revision 32295
Added by Keiju Ishitsuka almost 4 years ago

  • lib/irb/completion.rb: complate correctry string literal. fix [Bug #1145].

Revision 32295
Added by Keiju Ishitsuka almost 4 years ago

  • lib/irb/completion.rb: complate correctry string literal. fix [Bug #1145].

History

#1 Updated by Shyouhei Urabe over 4 years ago

  • Status changed from Open to Feedback

=begin
Sorry, can someone tell me if this still happens?
=end

#2 Updated by Adriano Mitre over 4 years ago

=begin
Yes, unfortunately it still happens.

Except for JRuby, all the following "rubies" have this defect:
* ruby-1.9.2-p136 [ x86_64 ]
* rbx-1.2.0-20101221 [ ]
* ree-1.8.7-2010.02 [ x86_64 ]
* ruby-1.8.7-p330 [ x86_64 ]
* jruby-1.5.6 [ amd64-java ]

My system:
* Ubuntu 9.10 (karmic)
$ uname -a
Linux adriano-desktop 2.6.31-22-server #70-Ubuntu SMP Thu Dec 2 00:00:57
UTC 2010 x86_64 GNU/Linux
=end

#3 Updated by Yui NARUSE almost 4 years ago

  • Assignee set to Keiju Ishitsuka
  • Status changed from Feedback to Assigned

#4 Updated by Hiroshi Nakamura almost 4 years ago

  • Target version set to 1.9.3

#5 Updated by Keiju Ishitsuka almost 4 years ago

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

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


  • lib/irb/completion.rb: complate correctry string literal. fix [Bug #1145].

Also available in: Atom PDF