Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby 1.9 and rdoc/usage confusion

Reply
Thread Tools

Ruby 1.9 and rdoc/usage confusion

 
 
andrew.pennebaker@gmail.com
Guest
Posts: n/a
 
      10-23-2012
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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefined Method confusion - Ruby Newbie (I know it rhymes, don't hurt me) Kaldrenon Ruby 3 07-17-2007 07:44 PM
Ruby + openssl + self signed certificates = confusion Neumann Ruby 0 08-11-2006 07:10 PM
#!/usr/bin/ruby , #!/usr/bin/ruby -w , #!/usr/bin/ruby -T?, #!/usr/bin/ruby -T1... anne001 Ruby 1 04-23-2006 03:02 PM
ruby course confusion Alex Combas Ruby 2 02-12-2006 08:16 PM
Ruby web app confusion Tristan Knowles Ruby 3 07-28-2005 07:14 AM



Advertisments