summaryrefslogtreecommitdiff
path: root/lib/irb/ext/history.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-16 22:09:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-16 22:09:29 +0000
commit4d2f38b7778cd51cdf1e877d61dbb1ad2b028557 (patch)
tree37b44b95a3fbe5055110e7ac4853cf48df351234 /lib/irb/ext/history.rb
parente84ce31a9e6e82bc1980ac34eb2b8f246caf77c0 (diff)
* ext/readline/readline.c: suppress warnings.
* lib/irb/extend-command.rb (IRB::ContextExtender.def_extend_command): ditto. * lib/irb/ext/history.rb (IRB::Context::set_last_value): ditto. * lib/irb/ext/history.rb (IRB::Context::eval_history): ditto. * lib/irb/locale.rb (IRB::Locale::real_load): ditto. * lib/irb/slex.rb (SLex::Node::create_subnode): remove garbage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/ext/history.rb')
-rw-r--r--lib/irb/ext/history.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb/ext/history.rb b/lib/irb/ext/history.rb
index d40a62e959..55cd56de2f 100644
--- a/lib/irb/ext/history.rb
+++ b/lib/irb/ext/history.rb
@@ -22,7 +22,7 @@ module IRB
_set_last_value(value)
@workspace.evaluate self, "_ = IRB.CurrentContext.last_value"
- if @eval_history #and !@eval_history_values.equal?(llv)
+ if (@eval_history ||= nil) #and !@eval_history_values.equal?(llv)
@eval_history_values.push @line_no, @last_value
@workspace.evaluate self, "__ = IRB.CurrentContext.instance_eval{@eval_history_values}"
end
@@ -33,7 +33,7 @@ module IRB
attr_reader :eval_history
def eval_history=(no)
if no
- if @eval_history
+ if (@eval_history ||= nil)
@eval_history_values.size(no)
else
@eval_history_values = History.new(no)