* lib/optparse.rb (OptionParser#environment): requires shellwords.

[ruby-dev:35466]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-07-13 21:02:28 +00:00
parent 6e0ed5570e
commit bd4c28afbd
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Mon Jul 14 06:02:26 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/optparse.rb (OptionParser#environment): requires shellwords.
[ruby-dev:35466]
Sun Jul 13 21:23:08 2008 Masaki Suketa <masaki.suketa@nifty.ne.jp> Sun Jul 13 21:23:08 2008 Masaki Suketa <masaki.suketa@nifty.ne.jp>
* ext/win32ole/win32ole.c (EVENTSINK_Invoke): using hash * ext/win32ole/win32ole.c (EVENTSINK_Invoke): using hash

View File

@ -1474,6 +1474,7 @@ class OptionParser
# #
def environment(env = File.basename($0, '.*')) def environment(env = File.basename($0, '.*'))
env = ENV[env] || ENV[env.upcase] or return env = ENV[env] || ENV[env.upcase] or return
require 'shellwords'
parse(*Shellwords.shellwords(env)) parse(*Shellwords.shellwords(env))
end end