From 9806da50f49843c6983e3110a23ab7822c2e089d Mon Sep 17 00:00:00 2001 From: Masataka Pocke Kuwabara Date: Thu, 13 Jun 2019 16:09:02 +0900 Subject: Suppress warnings --- lib/irb/ext/history.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/irb/ext/history.rb') diff --git a/lib/irb/ext/history.rb b/lib/irb/ext/history.rb index 62363b13f4..43c3e4dbf3 100644 --- a/lib/irb/ext/history.rb +++ b/lib/irb/ext/history.rb @@ -22,7 +22,7 @@ module IRB # :nodoc: def 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 @workspace.evaluate self, "__ = IRB.CurrentContext.instance_eval{@eval_history_values}" end @@ -30,6 +30,7 @@ module IRB # :nodoc: @last_value end + remove_method :eval_history= if method_defined?(:eval_history=) # The command result history limit. attr_reader :eval_history # Sets command result history limit. -- cgit v1.2.3