Bug #8988

[DOC] fix incorrect documentation for SizedQueue

Added by Jack Danger almost 2 years ago. Updated over 1 year ago.

[ruby-core:57681]
Status:Closed
Priority:Normal
Assignee:Zachary Scott
ruby -v:ruby 2.1.0dev (2013-10-05 trunk 43149) [x86_64-darwin12.4.0] Backport:1.9.3: UNKNOWN, 2.0.0: UNKNOWN

Description

The SizedQueue documentation was incorrect for both SizedQueue#pop and SizedQueue#num_waiting. This patch adds correct documentation using language that is very similar to Queue#pop and Queue#num_waiting.

  • Document-method: pop
  • call_seq: pop(non_block=false)
    *

    • * Returns the number of threads waiting on the queue.
    • * Retrieves data from the queue. If the queue is empty the calling thread is
    • * suspended until data is pushed onto the queue. If +non_block+ is true the
    • * thread isn't suspended and an exception is raised. */
    • * Document-method: pop
    • * call_seq: pop(non_block=false)
    • * Document-method: num_waiting
    • * call_seq: num_waiting *
  • Returns the number of threads waiting on the queue.
    */

Associated revisions

Revision 43673
Added by Zachary Scott over 1 year ago

  • ext/thread/thread.c: [DOC] This patch accomplishes the following:

    • Teach RDoc about ConditionVariable
    • Teach RDoc about Queue
    • Teach RDoc about SizedQueue
    • Use fully-qualified namespace for Document-method This is necessary to separate definitions between classes
    • Fix rdoc bug in call_seq vs. call-seq
    • Correct doc for SizedQueue#pop patch by @jackdanger [Bug #8988]

Revision 43673
Added by Zachary Scott over 1 year ago

  • ext/thread/thread.c: [DOC] This patch accomplishes the following:

    • Teach RDoc about ConditionVariable
    • Teach RDoc about Queue
    • Teach RDoc about SizedQueue
    • Use fully-qualified namespace for Document-method This is necessary to separate definitions between classes
    • Fix rdoc bug in call_seq vs. call-seq
    • Correct doc for SizedQueue#pop patch by @jackdanger [Bug #8988]

History

#1 Updated by Zachary Scott over 1 year ago

  • Status changed from Open to Closed

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


  • ext/thread/thread.c: [DOC] This patch accomplishes the following:

    • Teach RDoc about ConditionVariable
    • Teach RDoc about Queue
    • Teach RDoc about SizedQueue
    • Use fully-qualified namespace for Document-method This is necessary to separate definitions between classes
    • Fix rdoc bug in call_seq vs. call-seq
    • Correct doc for SizedQueue#pop patch by @jackdanger [Bug #8988]

Also available in: Atom PDF