diff options
author | Stan Lo <[email protected]> | 2024-02-23 18:02:14 +0800 |
---|---|---|
committer | git <[email protected]> | 2024-02-23 10:02:19 +0000 |
commit | 37dde6e2f82304848636015c0ce032cbdb5cd2a9 (patch) | |
tree | 4a7f6735f84fb60442d64a445bf976f3723df42f /lib/irb/ext/use-loader.rb | |
parent | f403660805bafd86d4ff8c56094af8d48f58a24d (diff) |
[ruby/irb] Unroll extension method generation
(https://github.com/ruby/irb/pull/882)
* Unroll extension method generation
Given we only have 2 remaining extension setter methods, both of which
only take 1 argument and don't have any alias, the current method generation
logic is overly complicated.
This commit simplifies the method generation logic by simply defining
the methods directly in the `IRB::Context` class.
* Fix use_loader extension
https://github.com/ruby/irb/commit/67eba5401b
Diffstat (limited to 'lib/irb/ext/use-loader.rb')
-rw-r--r-- | lib/irb/ext/use-loader.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb/ext/use-loader.rb b/lib/irb/ext/use-loader.rb index c5ecbe2847..b22e6d2bf4 100644 --- a/lib/irb/ext/use-loader.rb +++ b/lib/irb/ext/use-loader.rb @@ -4,7 +4,7 @@ # by Keiju ISHITSUKA([email protected]) # -require_relative "../cmd/load" +require_relative "../command/load" require_relative "loader" class Object @@ -49,7 +49,7 @@ module IRB if IRB.conf[:USE_LOADER] != opt IRB.conf[:USE_LOADER] = opt if opt - if !$".include?("irb/cmd/load") + if !$".include?("irb/command/load") end (class<<@workspace.main;self;end).instance_eval { alias_method :load, :irb_load |