summaryrefslogtreecommitdiff
path: root/lib/shellwords.rb
diff options
context:
space:
mode:
authorwakou <wakou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-03 19:25:07 +0000
committerwakou <wakou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-03 19:25:07 +0000
commitbfd441db8f5a17a9896257887eaffccbbf066541 (patch)
treedfff3d1ff96416a73ff82705c00049957c48a65f /lib/shellwords.rb
parent7dc25230bea45adeda8f82ac5fe333a225250803 (diff)
* lib/shellwords.rb: don't destroy argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/shellwords.rb')
-rw-r--r--lib/shellwords.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/shellwords.rb b/lib/shellwords.rb
index 5c31f8c..9fd7571 100644
--- a/lib/shellwords.rb
+++ b/lib/shellwords.rb
@@ -16,7 +16,7 @@ module Shellwords
unless line.kind_of?(String)
raise ArgumentError, "Argument must be String class object."
end
- line.sub!(/\A\s+/, '')
+ line = line.sub(/\A\s+/, '')
words = []
while line != ''
field = ''