ruby / ruby/irb

Config file placed at the project level at `.config/irb/irbrc` is not parsed.

Open
#904 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
478
Forks
158
Avg merge
1d 12h
Merged PRs (30d)
12

Description

The documentation states that:

The path to the configuration file is the first found among:
File +.config/irb/irbrc+ in the current directory, if it exists.

https://github.com/ruby/irb/blob/master/lib/irb.rb#L148

but there seems to be no code which would do this. Creating such file does nothing in reality as well: I have a project under ~/projects/notes and if I create a config file at ~/projects/notes/.config/irb/irbrc and put something like puts "test" there, nothing is printed when I run irb being at the project root.

https://github.com/ruby/irb/blob/35b87cf8933f67cf6e9e0edd1ca7d6395595a758/lib/irb/init.rb#L451

I really see beneficial to put a config file just under .config/irb/irbrc of my project instead of polluting project root, so I would like to double-check that it is a bug, rather than misleading documentation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the documented search order in lib/irb.rb around line 148 with the configuration lookup in lib/irb/init.rb around line 451. Reproduce the issue from a project root containing .config/irb/irbrc and verify that the file is loaded when running irb; done means the documented project-level path is parsed as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.