Ruby 1.9 and rdoc/usage confusion
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?
|All times are GMT. The time now is 11:16 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.