Project

General

Profile

Bug #6348

OptionParser#to_a raise NoMethodError

Added by shuujii (Shuji KOBAYASHI) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
Backport:
[ruby-dev:45568]

Description

=begin
OptionParser#to_a を呼び出すと NoMethodError が発生します。

$ ruby -r optparse -e 'OptionParser.new.to_a'
lib/ruby/1.9.1/optparse.rb:1074:in `to_a': undefined method `to_a' for "Usage: -e [options]":String (NoMethodError)
    from -e:1:in `<main>'

=end

Updated by shyouhei (Shyouhei Urabe) over 8 years ago

  • Status changed from Open to Feedback

仰るとおりですが、それがどうかしましたか。

どのようになっていてほしいかなどを、少し詳しく教えてください。

#2

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

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

This issue was solved with changeset r35453.
Shuji, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/optparse.rb (OptionParser#to_a): String#to_a is no longer defined. [ruby-dev:45568][Bug #6348]

Also available in: Atom PDF