# File lib/rbreadline.rb, line 6101 def add_history(string) if (@history_stifled && (@history_length == @history_max_entries)) # If the history is stifled, and history_length is zero, # and it equals history_max_entries, we don't save items. return if (@history_length == 0) @the_history.shift else if @the_history.nil? @the_history = [] @history_length = 1 else @history_length+=1 end end temp = alloc_history_entry(string, hist_inittime()) @the_history[@history_length] = nil @the_history[@history_length - 1] = temp end