[ruby-cvs:67508] sonots:r60327 (trunk): * object.c: Improve documentation of Kernel#Array

sonots at ruby-lang.org sonots at ruby-lang.org
Sun Oct 22 08:44:16 JST 2017

sonots	2017-10-22 08:44:15 +0900 (Sun, 22 Oct 2017)

  New Revision: 60327


    * object.c: Improve documentation of Kernel#Array
    Array(arg) does more than just call to_ary or to_a on the argument.
    It also falls back to returning [arg] if neither method is available.
    This patch extends the description and adds a few examples of how it
    handles common types of arguments, including an integer
    (which does not implement to_ary or to_a).
    Extend Kernel#Array doc to mention TypeError
    patched by ragesoss (Sage Ross) [fix GH-1663]

  Modified files:

More information about the ruby-cvs mailing list