From 17ccda54131e3e8f59fc5bc5be044aef78e2854c Mon Sep 17 00:00:00 2001 From: aycabta Date: Mon, 15 Jul 2019 08:32:50 +0900 Subject: Use #to_a for Readline::HISTORY directly --- lib/irb/ext/save-history.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/irb/ext/save-history.rb') 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 -- cgit v1.2.3