Project

General

Profile

Actions

Bug #1145

closed

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

Added by gtoast (C I) almost 16 years ago. Updated about 12 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.8.7 (2008-08-11 patchlevel 72) [powerpc-darwin8]
Backport:
[ruby-core:22018]

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'

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

  3. Press tab

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0