Project

General

Profile

Bug #6007

Use directive hack to make ARGF documentable in other tools

Added by lsegal (Loren Segal) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
2.0.0 (trunk)
[ruby-core:42515]

Description

RDoc is able to parse commented blocks of code (inside /**/) as a side-effect of its parsing, but other tools will ignore commented blocks. Using the "#if 0" directive hack is more portable among tools (like YARD) and still allows developers to properly ignore code by commenting it out (assuming the doc tool supports this). Note that the directive hack is already used in io.c (above this line), so this is not a novel methodology.

Note that I opened a pull request on Github also, just in case: https://github.com/ruby/ruby/pull/93

If this is accepted, can it be backported into 1.9.3 as well?

improve-ARGF-detection.patch (609 Bytes) improve-ARGF-detection.patch lsegal (Loren Segal), 02/13/2012 09:35 AM

Associated revisions

Revision 34576
Added by nobu (Nobuyoshi Nakada) over 5 years ago

  • io.c (Init_IO): use directive hack to make ARGF documentable in other tools. [Bug #6007]

Revision 34576
Added by nobu (Nobuyoshi Nakada) over 5 years ago

  • io.c (Init_IO): use directive hack to make ARGF documentable in other tools. [Bug #6007]

Revision 34576
Added by nobu (Nobuyoshi Nakada) over 5 years ago

  • io.c (Init_IO): use directive hack to make ARGF documentable in other tools. [Bug #6007]

Revision 34576
Added by nobu (Nobuyoshi Nakada) over 5 years ago

  • io.c (Init_IO): use directive hack to make ARGF documentable in other tools. [Bug #6007]

History

#2 Updated by nobu (Nobuyoshi Nakada) over 5 years ago

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

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


  • io.c (Init_IO): use directive hack to make ARGF documentable in other tools. [Bug #6007]

Also available in: Atom PDF