Bug #269

OptionParser#environment requires shellwords

Added by Takashi Tamura almost 6 years ago. Updated almost 3 years ago.

Assignee:Nobuyoshi Nakada
Target version:-
ruby -v:


OptionParser#environment が shellwords ライブラリの Shellwords.shellwords を
使っていますが、optparse.rb 自体は shellwords を require していません。
ので OptionParser#environment を使うと常に例外が発生します。

$ 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


#1 Updated by Shyouhei Urabe almost 6 years ago

  • Assignee set to Nobuyoshi Nakada

Assigning to nobu; optparse.

#2 Updated by Nobuyoshi Nakada almost 6 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r18058.

Also available in: Atom PDF