From: Run Paint Run Run Date: 2009-06-16T11:14:12+09:00 Subject: [ruby-core:23869] [Bug #1640] [PATCH] Documentation for the Rational Class Bug #1640: [PATCH] Documentation for the Rational Class http://redmine.ruby-lang.org/issues/show/1640 Author: Run Paint Run Run Status: Open, Priority: Normal Category: DOC ruby -v: ruby 1.9.2dev (2009-06-14 trunk 23691) [i686-linux] The Rational class has no documentation, so I've attached a first draft. Some comments: * The class was defined with a constant name which caused the Rdoc C parser to ignore it. I've changed the constant to a literal string, but I assume there's a better approach. * Some of the commented-out methods confused Rdoc. For instance, Rational#div had a commented-out alias of '//', which Rdoc displays. I didn't want to delete the commented-out code, so I'm not sure what to do about this. (I can't use :nodoc: for the function because it is used as #div). * I didn't document the #marshal_* methods because other classes don't. Is this correct? * I haven't documented the optional precision argument that some of the methods have because I wasn't sure I understood the algorithm enough to explain it. Any suggestions? * The #coerce documentation assumes that bug #1636 will be fixed. ---------------------------------------- http://redmine.ruby-lang.org