Project

General

Profile

Actions

Misc #12310

closed

ctime vs asctime - Documentation Issue? - http://ruby-doc.org/core-2.3.0/Time.html

Added by robertmcginn (Robert McGinn) almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Assignee:
-
[ruby-core:75126]

Description

All,

I was working through the Time Class documentation at http://ruby-doc.org/core-2.3.0/Time.html.

I noted a potential typo in the example code as per below.

**ctime** → string click to toggle source
Returns a canonical string representation of time.

Time.now.**asctime**   #=> "Wed Apr  9 08:56:03 2003"

The example code references a separate method (asctime) as oppose to ctime.

Running "methods" on a time object does reference two separate methods:-

asctime
ctime

I did a search and could not find a bug relating to this.

Best regards,

Robert

Updated by robertmcginn (Robert McGinn) almost 8 years ago

  • Tracker changed from Bug to Misc
Actions #2

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

  • Status changed from Open to Closed

Applied in changeset r54703.


time.c: add example [ci skip]

Updated by stomar (Marcus Stollsteimer) almost 8 years ago

@robert (Robert Gleeson)

FYI, Time#ctime and Time#asctime are aliases.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0