irb
irb copied to clipboard
Merge extensions under `EXTEND_COMMANDS` into `Context` class
There are a few features defined as extensions:
https://github.com/ruby/irb/blob/0e862c5751968c589904ed93c3d707d919390597/lib/irb/extend-command.rb#L314-L319
The intention was that those files will be lazily-loaded until the related methods are called. But if we look at context.rb, we can see that all of the methods are called in Context#initialize. So none of them are lazily loaded anymore.
Consider this lazy-loading mechanism + individual extensions' hacks to extend Context introduces unnecessary complexity to IRB (example), I think we should start merging them one by one.