From: "no6v (Nobuhiro IMAI)" Date: 2013-01-11T22:47:46+09:00 Subject: [ruby-core:51381] [ruby-trunk - Bug #7679] IRB history is broken Issue #7679 has been updated by no6v (Nobuhiro IMAI). =begin You need to set IRB.conf[:SAVE_HISTORY] how many lines you want to save. $ rm -f ~/.irbrc $ irb irb(main):001:0> 1 => 1 irb(main):002:0> 2 => 2 irb(main):003:0> 3 => 3 irb(main):004:0> Readline::HISTORY.to_a => ["1", "2", "3", "Readline::HISTORY.to_a"] irb(main):005:0> exit $ irb irb(main):001:0> *up arrow* nothing... $ echo 'IRB.conf[:SAVE_HISTORY] = 3' > ~/.irbrc $ irb irb(main):001:0> 1 => 1 irb(main):002:0> 2 => 2 irb(main):003:0> 3 => 3 irb(main):004:0> Readline::HISTORY.to_a => ["1", "2", "3", "Readline::HISTORY.to_a"] irb(main):005:0> exit $ irb irb(main):001:0> Readline::HISTORY.to_a => ["3", "Readline::HISTORY.to_a", "exit", "Readline::HISTORY.to_a"] Recently invoked 3 lines are restored from history file (~/.irb_history or so). HTH =end ---------------------------------------- Bug #7679: IRB history is broken https://bugs.ruby-lang.org/issues/7679#change-35357 Author: zzak (Zachary Scott) Status: Assigned Priority: Normal Assignee: keiju (Keiju Ishitsuka) Category: lib Target version: 2.0.0 ruby -v: 2.0.0 steps to reproduce: $ irb irb(main):001:> 1 + 2 => 3 irb(main):002:0> exit $ irb irb(main):001:0> *up arrow* nothing I should see at least "1 + 2" when I hit the up arrow. Using: ruby 2.0.0dev (2012-12-30 trunk 38663) [x86_64-linux] Also confirmed on: ruby 2.0.0dev (2013-01-07 trunk 38734) [x86_64-darwin12.2.0] -- http://bugs.ruby-lang.org/