Bug #269

OptionParser#environment requires shellwords

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

[ruby-dev:35466]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
Category:-
Target version:-
ruby -v:

Description

=begin
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
=end

History

#1 Updated by Shyouhei Urabe almost 6 years ago

  • Assignee set to Nobuyoshi Nakada

=begin
Assigning to nobu; optparse.
=end

#2 Updated by Nobuyoshi Nakada almost 6 years ago

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

=begin
Applied in changeset r18058.
=end

Also available in: Atom PDF