summaryrefslogtreecommitdiff
path: root/lib/irb/ext/save-history.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-07-15 08:32:50 +0900
committeraycabta <aycabta@gmail.com>2019-07-15 08:33:07 +0900
commit17ccda54131e3e8f59fc5bc5be044aef78e2854c (patch)
tree8b2dabcb057e67c52a3b72334d6105c775fa88c1 /lib/irb/ext/save-history.rb
parent9da969cae73b88a9e7acd761f184bd5275febdf7 (diff)
Use #to_a for Readline::HISTORY directly
Diffstat (limited to 'lib/irb/ext/save-history.rb')
-rw-r--r--lib/irb/ext/save-history.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/ext/save-history.rb b/lib/irb/ext/save-history.rb
index f7247898ab..dfde9d6fae 100644
--- a/lib/irb/ext/save-history.rb
+++ b/lib/irb/ext/save-history.rb
@@ -106,7 +106,7 @@ module IRB
end
open(history_file, 'w', 0600 ) do |f|
- hist = history.to_a.map { |l|
+ hist = history.map { |l|
split_lines = l.split("\n")
if split_lines.size == 1
l