diff options
author | Masataka Pocke Kuwabara <kuwabara@pocke.me> | 2019-06-13 16:09:02 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-07-15 00:13:01 +0900 |
commit | 9806da50f49843c6983e3110a23ab7822c2e089d (patch) | |
tree | 4cbca881fd333342813d9a1215ab328356d8ee3c /lib/irb/ext/history.rb | |
parent | 83171b0ee8dc8000819259bde764ea9ca3489290 (diff) |
Suppress warnings
Diffstat (limited to 'lib/irb/ext/history.rb')
-rw-r--r-- | lib/irb/ext/history.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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. |