Ruby 1.9 and rdoc/usage confusion

Discussion in 'Ruby' started by andrew.pennebaker@gmail.com, Oct 23, 2012.

  1. Guest

    Anyone trying to run a Ruby program in Ruby 1.9 that depends on rdoc/usage will experience a generic load error.

    If the user is astute and devoted enough to get the code working in 1.9, they will come across various message boards, they will see that rdoc/usage was removed from 1.9 and that users are recommended to rewrite their getopt code with OptionParser.

    Again, this is only what advanced users will see. The rest will simply be confused why their Ruby program isn't working. We could clear up this confusion in a variety of ways:

    * Add rdoc back into 1.9's builtin libs.
    * Publish an rdoc RubyGem targeting 1.9.
    * For the include and require statements for anything to do with rdoc, Ruby1.9 could intercept the statement and throw a helpful error message along the lines of "rdoc is not available in Ruby 1.9. Consider rewriting the code using OptionParser."

    I prefer the middle option, just publish an rdoc RubyGem. This has the benefit of not altering any core-Ruby things in 1.9, while adding backwards compatibility for 1.8 Ruby projects. The rdoc gem could print a "Warning: Deprecated. Consider rewriting using OptionParser." message to encourage peopleto switch to the new 1.9 getopt system.

    What do you think?
    , Oct 23, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Schwarz
    Replies:
    6
    Views:
    251
    Randy W. Sims
    Jan 1, 2004
  2. Brian Schröder
    Replies:
    5
    Views:
    133
    Dave Thomas
    Sep 18, 2004
  3. Daniel Berger
    Replies:
    1
    Views:
    142
    Dave Thomas
    Nov 2, 2004
  4. Suraj N. Kurapati
    Replies:
    0
    Views:
    125
    Suraj N. Kurapati
    Aug 29, 2006
  5. Juan felipe Alvarez saldarriaga

    rdoc/usage replacement in ruby 1.9 for a CLI app?

    Juan felipe Alvarez saldarriaga, Sep 23, 2009, in forum: Ruby
    Replies:
    3
    Views:
    204
    Juan Felipe Alvarez Saldarriaga
    Sep 30, 2009
Loading...

Share This Page