Skip to content

IRB leaking out Reline changes globally #1048

Open

Description

@szymonj99

Description

Calling to IRB.start results in IRB leaking out Reline changes globally.

Minimal Reproducible Example

require 'reline'
require 'irb'

::Reline.autocompletion = false

line = ::Reline.readline('PROMPT >> ', false)

IRB.start

line = ::Reline.readline('PROMPT >> ', false)

Current Workaround

I'm unsure if there's any other potential settings being changed. Here's what I have so far:

config = { autocompletion: Reline.autocompletion, core: Reline.core.dup }
IRB.start
Reline.autocompletion = config[:autocompletion]
Reline.instance_variable_set(:@core, @current_config[:core])

Expected Behaviour

I would expect that changes to Reline performed by IRB do not persist after quitting out of the IRB session.
My Reline changes and settings should remain what the were before and after.

Result of irb_info

irb(main):001> irb_info
Ruby version: 3.3.6
IRB version: irb 1.14.1 (2024-09-25)
InputMethod: RelineInputMethod with Reline 0.5.12
Completion: Autocomplete, RegexpCompletor
RUBY_PLATFORM: x86_64-linux
LANG env: en_GB.UTF-8
East Asian Ambiguous Width: 1

Terminal Emulator

Konsole. This happens on a Mac as well with the default terminal.

Setting Files

Are you using ~/.irbrc and ~/.inputrc?
-> No

Activity

  1. szymonj99 commented on Jun 3, 2025

    @szymonj99
    Author

    Are there any updates on this? 🙏
    Let me know if there is/there is not someone looking at this, and what next steps I can do to aid in fixing this.

  2. added a commit that references this issue on Oct 20, 2025
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