diff options
author | aycabta <aycabta@gmail.com> | 2019-07-15 08:32:50 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-07-15 08:33:07 +0900 |
commit | 17ccda54131e3e8f59fc5bc5be044aef78e2854c (patch) | |
tree | 8b2dabcb057e67c52a3b72334d6105c775fa88c1 /lib/irb | |
parent | 9da969cae73b88a9e7acd761f184bd5275febdf7 (diff) | |
download | ruby-17ccda54131e3e8f59fc5bc5be044aef78e2854c.tar.gz |
Use #to_a for Readline::HISTORY directly
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/ext/save-history.rb | 2 |
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 |