From bfd441db8f5a17a9896257887eaffccbbf066541 Mon Sep 17 00:00:00 2001 From: wakou Date: Sun, 3 Jun 2001 19:25:07 +0000 Subject: [PATCH] * lib/shellwords.rb: don't destroy argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/shellwords.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index decb68b4af..2d4334b394 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Jun 4 04:14:53 2001 Wakou Aoyama + + * lib/shellwords.rb: don't destroy argument. + Sat Jun 2 23:05:20 2001 Shugo Maeda * lib/cgi/session.rb: don't use module_function for Class. diff --git a/lib/shellwords.rb b/lib/shellwords.rb index 5c31f8ca78..9fd7571172 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 = ''