summaryrefslogtreecommitdiff
path: root/lib/reline/config.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-07-04 18:49:42 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-07-04 18:49:42 +0900
commit12e06d32f55dff7f35c66842e5d6901857132060 (patch)
tree43fc156ca329ee04ebbbd9dd7c90a5d619d9f657 /lib/reline/config.rb
parentee861e43f70d827abd1f8d26b2e97920237348b4 (diff)
Use lstrip instead of gsub which can match only once
Diffstat (limited to 'lib/reline/config.rb')
-rw-r--r--lib/reline/config.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/config.rb b/lib/reline/config.rb
index 760777997e..5c10d7fa91 100644
--- a/lib/reline/config.rb
+++ b/lib/reline/config.rb
@@ -123,7 +123,7 @@ class Reline::Config
no += 1
- line = line.chomp.gsub(/^\s*/, '')
+ line = line.chomp.lstrip
if line[0, 1] == '$'
handle_directive(line[1..-1], file, no)
next