[Ruby 1.8 - Bug #269] (Open) OptionParser#environment requires shellwords

e$B%A%1%C%He(B #269 e$B$,Js9p$5$l$^$7$?!#e(B (by Takashi T.)


Bug #269: OptionParser#environment requires shellwords
http://redmine.ruby-lang.org/issues/show/269

e$B5/I<<Te(B: Takashi T.
e$B%9%F!<%?%9e(B: Open
e$BM%@hEYe(B: Normal
e$BC4Ev<Te(B:
e$B%+%F%4%je(B:
Target version:

OptionParser#environment e$B$,e(B shellwords e$B%i%$%V%i%j$Ne(B
Shellwords.shellwords e$B$re(B
e$B;H$C$F$$$^$9$,!"e(Boptparse.rb e$B<+BN$Oe(B shellwords e$B$re(B
require e$B$7$F$$$^$;$s!#e(B
e$B$N$Ge(B OptionParser#environment e$B$r;H$&$H>o$KNc30$,H/@8$7$^$9!#e(B

$ cat t.rb
require ‘optparse’
ENV[“A”] = ‘-a -b’
p OptionParser.new.environment(“A”)

$ ruby-1.8 -v t.rb
ruby 1.8.7 (2008-07-01 revision 17756) [i686-linux]
/usr/local/lib/ruby/1.8/optparse.rb:1479:in `environment’:
uninitialized constant OptionParser::Shellwords (NameError)
from t.rb:3

e$B%A%1%C%He(B #269 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r18058.

http://redmine.ruby-lang.org/issues/show/269