summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-25 13:53:41 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-25 13:53:41 +0000
commita9be3e4f031a41d193a2d22e302031fdb0d1f881 (patch)
tree1102b1d62e185b7d250a8d378e5b7cb5b72119ee
parent01ad1e82b507c27563592145bf32e9a56b3741f0 (diff)
* lib/irb/input-method.rb: do not use Readline::HISTORY.pop.
(backported from HEAD) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/irb/input-method.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b5df5d132a..39b8e9a1f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed May 25 22:52:42 2005 Shugo Maeda <shugo@ruby-lang.org>
+
+ * lib/irb/input-method.rb: do not use Readline::HISTORY.pop.
+ (backported from HEAD)
+
Wed May 25 21:55:40 2005 Shugo Maeda <shugo@ruby-lang.org>
* ext/readline/readline.c: supported libedit. (backported from HEAD)
diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb
index 750add767e..bfb90fa59a 100644
--- a/lib/irb/input-method.rb
+++ b/lib/irb/input-method.rb
@@ -94,8 +94,8 @@ module IRB
end
def gets
- if l = readline(@prompt, true)
- HISTORY.pop if l.empty?
+ if l = readline(@prompt, false)
+ HISTORY.push(l) if !l.empty?
@line[@line_no += 1] = l + "\n"
else
@eof = true