method
use_loader=
v2_2_9 -
Show latest stable
- Class:
IRB::Context
use_loader=(opt)public
Sets IRB.conf[:USE_LOADER]
See #use_loader for more information.
# File lib/irb/ext/use-loader.rb, line 49
def use_loader=(opt)
if IRB.conf[:USE_LOADER] != opt
IRB.conf[:USE_LOADER] = opt
if opt
if !$".include?("irb/cmd/load")
end
(class<<@workspace.main;self;end).instance_eval {
alias_method :load, :irb_load
alias_method :require, :irb_require
}
else
(class<<@workspace.main;self;end).instance_eval {
alias_method :load, :__original__load__IRB_use_loader__
alias_method :require, :__original__require__IRB_use_loader__
}
end
end
print "Switch to load/require#{unless use_loader; ' non';end} trace mode.\n" if verbose?
opt
end Related methods
- Instance methods
- __exit__
- __inspect__
- __to_s__
- _set_last_value
- change_workspace
- debug?
- debug_level=
- eval_history=
- evaluate
- exit
- file_input?
- history_file
- history_file=
- home_workspace
- init_save_history
- inspect
- inspect?
- inspect_last_value
- inspect_mode=
- irb_level
- main
- math_mode=
- pop_workspace
- prompt_mode=
- prompting?
- push_workspace
- save_history
- save_history=
- set_last_value
- to_s
- use_loader
- use_loader=
- use_loader?
- use_readline=
- use_tracer=
- verbose?
- workspaces
- Class methods
- new