Project

General

Profile

Bug #5210

Kernel#require documentation is incomplete

Added by agrimm (Andrew Grimm) about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]
Backport:
[ruby-core:39040]

Description

The documentation for Kernel#require could benefit from additional description.

It does not describe what a return method of false means. Many people initially think that a return value of false means that the require method was unsuccessful. See, for example, http://stackoverflow.com/q/1250329/38765 and http://stackoverflow.com/q/1793693/38765 . So explaining that it merely means that the library has already been loaded would be useful.

Mentioning that a LoadError is raised if unsuccessful would also be nice.

As a side issue, "it's" is used when it should be "its". The former means "it is", while the latter mean "something belonging to it".

Associated revisions

Revision a14e13b2
Added by drbrain (Eric Hodel) about 8 years ago

  • load.c (rb_f_require): Improve documentation of Kernel#require. [Ruby 1.9 - Bug #5210]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 33027
Added by drbrain (Eric Hodel) about 8 years ago

  • load.c (rb_f_require): Improve documentation of Kernel#require. [Ruby 1.9 - Bug #5210]

Revision 33027
Added by drbrain (Eric Hodel) about 8 years ago

  • load.c (rb_f_require): Improve documentation of Kernel#require. [Ruby 1.9 - Bug #5210]

Revision 33027
Added by drbrain (Eric Hodel) about 8 years ago

  • load.c (rb_f_require): Improve documentation of Kernel#require. [Ruby 1.9 - Bug #5210]

Revision 33027
Added by drbrain (Eric Hodel) about 8 years ago

  • load.c (rb_f_require): Improve documentation of Kernel#require. [Ruby 1.9 - Bug #5210]

Revision 33027
Added by drbrain (Eric Hodel) about 8 years ago

  • load.c (rb_f_require): Improve documentation of Kernel#require. [Ruby 1.9 - Bug #5210]

Revision 33027
Added by drbrain (Eric Hodel) about 8 years ago

  • load.c (rb_f_require): Improve documentation of Kernel#require. [Ruby 1.9 - Bug #5210]

Revision df0cb1c4
Added by drbrain (Eric Hodel) about 8 years ago

  • backport r33027 from trunk.

  • load.c (rb_f_require): Improve documentation of Kernel#require.
    [Ruby 1.9 - Bug #5210]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

History

Updated by drbrain (Eric Hodel) about 8 years ago

  • Category set to doc
  • Assignee set to drbrain (Eric Hodel)
#2

Updated by drbrain (Eric Hodel) about 8 years ago

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

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


  • load.c (rb_f_require): Improve documentation of Kernel#require. [Ruby 1.9 - Bug #5210]

Also available in: Atom PDF