Skip to content

IRB history gets saved in the RUBY_HOME instead of HOME #4158

Description

@martijn

Description

After updating rvm 1.29.1 to 1.29.3 history gets saved in ~/.rvm/rubies/ruby-2.x.x/.irbrc_history or /usr/local/rvm/rubies/ruby-2.x.x/.irbrc_history instead of ~/irb-history.

We've witnessed this on all our system-wide CentOS 7 installations as wel as local macOS installations.

This is troublesome in a system installation because it leaks history between users and the file is owned by the user who created it, leading to irb errors for other users.

Steps to reproduce

  • Install rvm 1.29.3

  • Select an rvm ruby

  • Start irb

  • Enter some statements

  • Quit irb

  • Notice history gets saved in the ruby directory instead of the home directory

Expected behavior

When running rvm with the default settings I expect history to be saved in ~/.irb-history as it was with 1.29.1 (did not test 1.29.2).

Actual behavior

History gets saved in ~/.rvm/rubies/ruby-2.x.x/.irbrc_history / /usr/local/rvm/rubies/ruby-2.x.x/.irbrc_history

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions