Skip to content

Copy&Paste code with TAB symbol inserts source into the code which makes it void value expression #382

Closed

Description

@vimutter

Description

IRB Copy&Pasting code with TAB symbol inserts source into the code which makes it void value expression.

Essentially if you want to quick test run some code from editor which contains TAB, code inserted gets altered which makes it invalid.

Test code

def test
  loop do
  	break # Here is <space><space><tab>break
  end
end

If you paste it gets entered as:

def test
  loop do
source break 
  end
end

Result of irb_info

Ruby version: 3.1.1
IRB version: irb 1.4.1 (2021-12-25)
InputMethod: ReidlineInputMethod with Reline 0.3.0
.irbrc path: /home/user/.rvm/rubies/ruby-3.1.1/.irbrc
RUBY_PLATFORM: x86_64-linux
LANG env: C.UTF-8
East Asian Ambiguous Width: 1

Activity

  1. tompng commented on Aug 14, 2024

    @tompng
    Member

    IRB 1.11.1 #832 fixed not to autocomplete on the beginning of the line.
    Reline 0.5.6 ruby/reline#655 supported bracketed paste. Reline will insert TAB character(if terminal emulator supports bracketed paste feature).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions