Skip to content

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

@vimutter

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

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