@@ -47,7 +47,7 @@ def irb_context
47
47
48
48
@EXTEND_COMMANDS = [
49
49
[
50
- :irb_current_working_workspace , :CurrentWorkingWorkspace , "irb/ cmd/chws" ,
50
+ :irb_current_working_workspace , :CurrentWorkingWorkspace , "cmd/chws" ,
51
51
[ :irb_print_working_workspace , OVERRIDE_ALL ] ,
52
52
[ :irb_cwws , OVERRIDE_ALL ] ,
53
53
[ :irb_pwws , OVERRIDE_ALL ] ,
@@ -59,7 +59,7 @@ def irb_context
59
59
[ :irb_pwb , OVERRIDE_ALL ] ,
60
60
] ,
61
61
[
62
- :irb_change_workspace , :ChangeWorkspace , "irb/ cmd/chws" ,
62
+ :irb_change_workspace , :ChangeWorkspace , "cmd/chws" ,
63
63
[ :irb_chws , OVERRIDE_ALL ] ,
64
64
[ :irb_cws , OVERRIDE_ALL ] ,
65
65
[ :chws , NO_OVERRIDE ] ,
@@ -70,21 +70,21 @@ def irb_context
70
70
] ,
71
71
72
72
[
73
- :irb_workspaces , :Workspaces , "irb/ cmd/pushws" ,
73
+ :irb_workspaces , :Workspaces , "cmd/pushws" ,
74
74
[ :workspaces , NO_OVERRIDE ] ,
75
75
[ :irb_bindings , OVERRIDE_ALL ] ,
76
76
[ :bindings , NO_OVERRIDE ] ,
77
77
] ,
78
78
[
79
- :irb_push_workspace , :PushWorkspace , "irb/ cmd/pushws" ,
79
+ :irb_push_workspace , :PushWorkspace , "cmd/pushws" ,
80
80
[ :irb_pushws , OVERRIDE_ALL ] ,
81
81
[ :pushws , NO_OVERRIDE ] ,
82
82
[ :irb_push_binding , OVERRIDE_ALL ] ,
83
83
[ :irb_pushb , OVERRIDE_ALL ] ,
84
84
[ :pushb , NO_OVERRIDE ] ,
85
85
] ,
86
86
[
87
- :irb_pop_workspace , :PopWorkspace , "irb/ cmd/pushws" ,
87
+ :irb_pop_workspace , :PopWorkspace , "cmd/pushws" ,
88
88
[ :irb_popws , OVERRIDE_ALL ] ,
89
89
[ :popws , NO_OVERRIDE ] ,
90
90
[ :irb_pop_binding , OVERRIDE_ALL ] ,
@@ -93,55 +93,55 @@ def irb_context
93
93
] ,
94
94
95
95
[
96
- :irb_load , :Load , "irb/ cmd/load" ] ,
96
+ :irb_load , :Load , "cmd/load" ] ,
97
97
[
98
- :irb_require , :Require , "irb/ cmd/load" ] ,
98
+ :irb_require , :Require , "cmd/load" ] ,
99
99
[
100
- :irb_source , :Source , "irb/ cmd/load" ,
100
+ :irb_source , :Source , "cmd/load" ,
101
101
[ :source , NO_OVERRIDE ] ,
102
102
] ,
103
103
104
104
[
105
- :irb , :IrbCommand , "irb/ cmd/subirb" ] ,
105
+ :irb , :IrbCommand , "cmd/subirb" ] ,
106
106
[
107
- :irb_jobs , :Jobs , "irb/ cmd/subirb" ,
107
+ :irb_jobs , :Jobs , "cmd/subirb" ,
108
108
[ :jobs , NO_OVERRIDE ] ,
109
109
] ,
110
110
[
111
- :irb_fg , :Foreground , "irb/ cmd/subirb" ,
111
+ :irb_fg , :Foreground , "cmd/subirb" ,
112
112
[ :fg , NO_OVERRIDE ] ,
113
113
] ,
114
114
[
115
- :irb_kill , :Kill , "irb/ cmd/subirb" ,
115
+ :irb_kill , :Kill , "cmd/subirb" ,
116
116
[ :kill , OVERRIDE_PRIVATE_ONLY ] ,
117
117
] ,
118
118
119
119
[
120
- :irb_help , :Help , "irb/ cmd/help" ,
120
+ :irb_help , :Help , "cmd/help" ,
121
121
[ :help , NO_OVERRIDE ] ,
122
122
] ,
123
123
124
124
[
125
- :irb_info , :Info , "irb/ cmd/info"
125
+ :irb_info , :Info , "cmd/info"
126
126
] ,
127
127
128
128
[
129
- :irb_ls , :Ls , "irb/ cmd/ls" ,
129
+ :irb_ls , :Ls , "cmd/ls" ,
130
130
[ :ls , NO_OVERRIDE ] ,
131
131
] ,
132
132
133
133
[
134
- :irb_measure , :Measure , "irb/ cmd/measure" ,
134
+ :irb_measure , :Measure , "cmd/measure" ,
135
135
[ :measure , NO_OVERRIDE ] ,
136
136
] ,
137
137
138
138
[
139
- :irb_show_source , :ShowSource , "irb/ cmd/show_source" ,
139
+ :irb_show_source , :ShowSource , "cmd/show_source" ,
140
140
[ :show_source , NO_OVERRIDE ] ,
141
141
] ,
142
142
143
143
[
144
- :irb_whereami , :Whereami , "irb/ cmd/whereami" ,
144
+ :irb_whereami , :Whereami , "cmd/whereami" ,
145
145
[ :whereami , NO_OVERRIDE ] ,
146
146
] ,
147
147
@@ -187,7 +187,7 @@ def self.def_extend_command(cmd_name, cmd_class, load_file = nil, *aliases)
187
187
kwargs = ", **kwargs" if RUBY_ENGINE == "ruby" && RUBY_VERSION >= "2.7.0"
188
188
line = __LINE__ ; eval %[
189
189
def #{ cmd_name } (*opts#{ kwargs } , &b)
190
- require "#{ load_file } "
190
+ require_relative "#{ load_file } "
191
191
arity = ExtendCommand::#{ cmd_class } .instance_method(:execute).arity
192
192
args = (1..(arity < 0 ? ~arity : arity)).map {|i| "arg" + i.to_s }
193
193
args << "*opts#{ kwargs } " if arity < 0
@@ -262,10 +262,10 @@ module ContextExtender
262
262
CE = ContextExtender # :nodoc:
263
263
264
264
@EXTEND_COMMANDS = [
265
- [ :eval_history= , "irb/ ext/history.rb" ] ,
266
- [ :use_tracer= , "irb/ ext/tracer.rb" ] ,
267
- [ :use_loader= , "irb/ ext/use-loader.rb" ] ,
268
- [ :save_history= , "irb/ ext/save-history.rb" ] ,
265
+ [ :eval_history= , "ext/history.rb" ] ,
266
+ [ :use_tracer= , "ext/tracer.rb" ] ,
267
+ [ :use_loader= , "ext/use-loader.rb" ] ,
268
+ [ :save_history= , "ext/save-history.rb" ] ,
269
269
]
270
270
271
271
# Installs the default context extensions as irb commands:
@@ -288,7 +288,7 @@ def self.def_extend_command(cmd_name, load_file, *aliases)
288
288
line = __LINE__ ; Context . module_eval %[
289
289
def #{ cmd_name } (*opts, &b)
290
290
Context.module_eval {remove_method(:#{ cmd_name } )}
291
- require "#{ load_file } "
291
+ require_relative "#{ load_file } "
292
292
__send__ :#{ cmd_name } , *opts, &b
293
293
end
294
294
for ali in aliases
0 commit comments