Project

General

Profile

Actions

Bug #269

closed

OptionParser#environment requires shellwords

Added by sheepman (Takashi Tamura) over 16 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
[ruby-dev:35466]

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

Actions

Also available in: Atom PDF

Like0
Like0Like0