mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Suppress warnings
This commit is contained in:
parent
83171b0ee8
commit
9806da50f4
3 changed files with 6 additions and 2 deletions
|
@ -22,7 +22,7 @@ module IRB # :nodoc:
|
||||||
def set_last_value(value)
|
def set_last_value(value)
|
||||||
_set_last_value(value)
|
_set_last_value(value)
|
||||||
|
|
||||||
if @eval_history
|
if defined?(@eval_history) && @eval_history
|
||||||
@eval_history_values.push @line_no, @last_value
|
@eval_history_values.push @line_no, @last_value
|
||||||
@workspace.evaluate self, "__ = IRB.CurrentContext.instance_eval{@eval_history_values}"
|
@workspace.evaluate self, "__ = IRB.CurrentContext.instance_eval{@eval_history_values}"
|
||||||
end
|
end
|
||||||
|
@ -30,6 +30,7 @@ module IRB # :nodoc:
|
||||||
@last_value
|
@last_value
|
||||||
end
|
end
|
||||||
|
|
||||||
|
remove_method :eval_history= if method_defined?(:eval_history=)
|
||||||
# The command result history limit.
|
# The command result history limit.
|
||||||
attr_reader :eval_history
|
attr_reader :eval_history
|
||||||
# Sets command result history limit.
|
# Sets command result history limit.
|
||||||
|
|
|
@ -27,7 +27,7 @@ module IRB
|
||||||
IRB.conf[:SAVE_HISTORY]
|
IRB.conf[:SAVE_HISTORY]
|
||||||
end
|
end
|
||||||
|
|
||||||
remove_method :save_history= if respond_to?(:save_history=)
|
remove_method :save_history= if method_defined?(:save_history=)
|
||||||
# Sets <code>IRB.conf[:SAVE_HISTORY]</code> to the given +val+ and calls
|
# Sets <code>IRB.conf[:SAVE_HISTORY]</code> to the given +val+ and calls
|
||||||
# #init_save_history with this context.
|
# #init_save_history with this context.
|
||||||
#
|
#
|
||||||
|
|
|
@ -20,10 +20,12 @@ end
|
||||||
|
|
||||||
module IRB
|
module IRB
|
||||||
module ExtendCommandBundle
|
module ExtendCommandBundle
|
||||||
|
remove_method :irb_load if method_defined?(:irb_load)
|
||||||
# Loads the given file similarly to Kernel#load, see IrbLoader#irb_load
|
# Loads the given file similarly to Kernel#load, see IrbLoader#irb_load
|
||||||
def irb_load(*opts, &b)
|
def irb_load(*opts, &b)
|
||||||
ExtendCommand::Load.execute(irb_context, *opts, &b)
|
ExtendCommand::Load.execute(irb_context, *opts, &b)
|
||||||
end
|
end
|
||||||
|
remove_method :irb_require if method_defined?(:irb_require)
|
||||||
# Loads the given file similarly to Kernel#require
|
# Loads the given file similarly to Kernel#require
|
||||||
def irb_require(*opts, &b)
|
def irb_require(*opts, &b)
|
||||||
ExtendCommand::Require.execute(irb_context, *opts, &b)
|
ExtendCommand::Require.execute(irb_context, *opts, &b)
|
||||||
|
@ -44,6 +46,7 @@ module IRB
|
||||||
|
|
||||||
alias use_loader? use_loader
|
alias use_loader? use_loader
|
||||||
|
|
||||||
|
remove_method :use_loader= if method_defined?(:use_loader=)
|
||||||
# Sets IRB.conf[:USE_LOADER]
|
# Sets IRB.conf[:USE_LOADER]
|
||||||
#
|
#
|
||||||
# See #use_loader for more information.
|
# See #use_loader for more information.
|
||||||
|
|
Loading…
Add table
Reference in a new issue