diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/irb/history.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/history.rb b/lib/irb/history.rb index 84d69e19cd..06088adb0d 100644 --- a/lib/irb/history.rb +++ b/lib/irb/history.rb @@ -60,7 +60,7 @@ module IRB end File.open(history_file, (append_history ? 'a' : 'w'), 0o600, encoding: IRB.conf[:LC_MESSAGES]&.encoding) do |f| - hist = history.map{ |l| l.split("\n").join("\\\n") } + hist = history.map{ |l| l.scrub.split("\n").join("\\\n") } unless append_history begin hist = hist.last(num) if hist.size > num and num > 0 |
