summaryrefslogtreecommitdiffstats
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
commitdbf49eb688667280f27d0a561b88f0e4fddf0738 (patch)
treedfff3d1ff96416a73ff82705c00049957c48a65f
parent62e6367984afc3e0dfc3c632b1349a10d1565bb8 (diff)
downloadruby-dbf49eb688667280f27d0a561b88f0e4fddf0738.tar.gz
ruby-dbf49eb688667280f27d0a561b88f0e4fddf0738.tar.xz
ruby-dbf49eb688667280f27d0a561b88f0e4fddf0738.zip
* lib/shellwords.rb: don't destroy argument.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--lib/shellwords.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index decb68b4a..2d4334b39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Jun 4 04:14:53 2001 Wakou Aoyama <wakou@fsinet.or.jp>
+
+ * lib/shellwords.rb: don't destroy argument.
+
Sat Jun 2 23:05:20 2001 Shugo Maeda <shugo@ruby-lang.org>
* lib/cgi/session.rb: don't use module_function for Class.
diff --git a/lib/shellwords.rb b/lib/shellwords.rb
index 5c31f8ca7..9fd757117 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 = ''