Fix RubyLex deprecation warning
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 478
- Forks
- 158
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 12
Description
Why
Hello. 👋 I'm running into deprecation warnings when using IRB where I see the following in my console:
warning: constant ::RubyLex is deprecated
How
The fastest way to reproduce this is by launching IRB from your console and running the following (ensure Ruby warnings are enabled too):
Object.constants.find { Object.const_get(it) == Ruby }
Notes
I'm using the following environment:
- Ruby: ruby 4.0.0 (2025-12-25 revision 553f1675f3) +YJIT +PRISM [arm64-darwin24.6.0]
- IRB: 1.16.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the warning in IRB with Ruby warnings enabled, using the Object.constants command from the issue. Locate the RubyLex deprecation definition and its IRB references, then inspect existing regression-test patterns. Done means the reproduction no longer emits the warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100