`IRB::IrbLoader` aliases of `load`/`require` trigger the alias-fallback deprecation warning on Ruby master
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with lib/irb/ext/loader.rb at lines 16-17, where the aliases for load and require produce warnings on Ruby master. Reproduce with docker run --rm rubylang/ruby:master ruby -w -e 'require "irb"', then run rake test head. Done means requiring IRB and starting irb emit no alias-fallback deprecation warnings.
Written by the indexing model from the issue text.
Description
Steps to reproduce
docker run --rm rubylang/ruby:master ruby -w -e 'require "irb"'
The same warnings appear when starting irb itself with ruby -w -S irb.
Expected behavior
require "irb" emits no warnings.
Actual behavior
$ ruby -v
ruby 4.1.0dev (2026-09-20T00:17:23Z master 241ea171d1) +PRISM [x86_64-linux]
$ ruby -w -e 'require "irb"'
/usr/local/lib/ruby/gems/4.1.0+4/gems/irb-1.18.0/lib/irb/ext/loader.rb:16: warning: the fallback to Object for alias of 'load' in module 'IRB::IrbLoader' is deprecated and will be removed in Ruby 4.3
/usr/local/lib/ruby/gems/4.1.0+4/gems/irb-1.18.0/lib/irb/ext/loader.rb:17: warning: the fallback to Object for alias of 'require' in module 'IRB::IrbLoader' is deprecated and will be removed in Ruby 4.3
The warnings also appear in this repository's own CI against ruby head, for example in https://github.com/ruby/irb/actions/runs/35449203213/job/105913325835 (rake test head, ruby 4.1.0dev 97207692c2): lib/irb/ext/loader.rb:16 and :17 are reported 48 times across the test processes, although the job still passes because warnings are not turned into errors.
Reference
alias in a module used to fall back to searching Object when the method is defined neither in the module nor in its ancestors. Ruby master now warns about this fallback, and the plan is to warn unconditionally in Ruby 4.2 and to raise NameError in Ruby 4.3, at which point require "irb" would fail.
- Dominant language
- Ruby
- Stars
- 478
- Forks
- 158
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 12
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.
More from ruby/irb
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Proposal: public hook for external documentation providers in show_doc and the completion doc dialog Open
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100