ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:79894] [Ruby trunk Bug#13275] RDoc bug for "Document-method: []"
       [not found] <redmine.issue-13275.20170303115909@ruby-lang.org>
@ 2017-03-03 11:59 ` sto.mar
  2017-06-03 11:57 ` [ruby-core:81558] " sto.mar
  2019-06-24 21:34 ` [ruby-core:93345] " merch-redmine
  2 siblings, 0 replies; 3+ messages in thread
From: sto.mar @ 2017-03-03 11:59 UTC (permalink / raw
  To: ruby-core

Issue #13275 has been reported by Marcus Stollsteimer.

----------------------------------------
Bug #13275: RDoc bug for "Document-method: []"
https://bugs.ruby-lang.org/issues/13275

* Author: Marcus Stollsteimer
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
RDoc doesn't handle Document-method directives for `#[]` correctly. When multiple directives are given, "Document-method: []" shows up as a code block, at the beginning of the docs for the method of the directive before:

```
$ cat document-method-test.c 
/*
 * Document-method: foo
 * Document-method: []
 * Document-method: bar
 *
 * Does nothing.
 */
static VALUE
rb_my_method(void)
{

}

rb_cFoo = rb_define_class("Foo", rb_cObject);
rb_define_method(rb_cFoo, "foo", rb_my_method, 0);
rb_define_method(rb_cFoo, "bar", rb_my_method, 0);
rb_define_method(rb_cFoo, "[]", rb_my_method, 0);
```

The directive affects the docs for `#foo`:

```
$ rdoc --ri document-method-test.c -o mydoc
$ ri Foo.foo -d mydoc

Foo.foo

(from /.../.../mydoc)
------------------------------------------------------------------------------
  foo()

------------------------------------------------------------------------------

  Document-method: []

Does nothing.
```

When the order of the Document-method directives is changed, with `Document-method: []` as the first one, everything is rendered correctly.

Real life example: https://docs.ruby-lang.org/en/2.3.0/Proc.html#method-i-call




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:81558] [Ruby trunk Bug#13275] RDoc bug for "Document-method: []"
       [not found] <redmine.issue-13275.20170303115909@ruby-lang.org>
  2017-03-03 11:59 ` [ruby-core:79894] [Ruby trunk Bug#13275] RDoc bug for "Document-method: []" sto.mar
@ 2017-06-03 11:57 ` sto.mar
  2019-06-24 21:34 ` [ruby-core:93345] " merch-redmine
  2 siblings, 0 replies; 3+ messages in thread
From: sto.mar @ 2017-06-03 11:57 UTC (permalink / raw
  To: ruby-core

Issue #13275 has been updated by stomar (Marcus Stollsteimer).


The docs for Proc#call have been fixed with above workaround in r57767 and related backports.

I also opened an issue on GitHub: https://github.com/rdoc/rdoc/issues/452.

----------------------------------------
Bug #13275: RDoc bug for "Document-method: []"
https://bugs.ruby-lang.org/issues/13275#change-65261

* Author: stomar (Marcus Stollsteimer)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
RDoc doesn't handle Document-method directives for `#[]` correctly. When multiple directives are given, "Document-method: []" shows up as a code block, at the beginning of the docs for the method of the directive before:

```
$ cat document-method-test.c 
/*
 * Document-method: foo
 * Document-method: []
 * Document-method: bar
 *
 * Does nothing.
 */
static VALUE
rb_my_method(void)
{

}

rb_cFoo = rb_define_class("Foo", rb_cObject);
rb_define_method(rb_cFoo, "foo", rb_my_method, 0);
rb_define_method(rb_cFoo, "bar", rb_my_method, 0);
rb_define_method(rb_cFoo, "[]", rb_my_method, 0);
```

The directive affects the docs for `#foo`:

```
$ rdoc --ri document-method-test.c -o mydoc
$ ri Foo.foo -d mydoc

Foo.foo

(from /.../.../mydoc)
------------------------------------------------------------------------------
  foo()

------------------------------------------------------------------------------

  Document-method: []

Does nothing.
```

When the order of the Document-method directives is changed, with `Document-method: []` as the first one, everything is rendered correctly.

Real life example: https://docs.ruby-lang.org/en/2.3.0/Proc.html#method-i-call




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:93345] [Ruby trunk Bug#13275] RDoc bug for "Document-method: []"
       [not found] <redmine.issue-13275.20170303115909@ruby-lang.org>
  2017-03-03 11:59 ` [ruby-core:79894] [Ruby trunk Bug#13275] RDoc bug for "Document-method: []" sto.mar
  2017-06-03 11:57 ` [ruby-core:81558] " sto.mar
@ 2019-06-24 21:34 ` merch-redmine
  2 siblings, 0 replies; 3+ messages in thread
From: merch-redmine @ 2019-06-24 21:34 UTC (permalink / raw
  To: ruby-core

Issue #13275 has been updated by jeremyevans0 (Jeremy Evans).

Status changed from Open to Closed

Fixed: https://github.com/ruby/rdoc/issues/452

----------------------------------------
Bug #13275: RDoc bug for "Document-method: []"
https://bugs.ruby-lang.org/issues/13275#change-78850

* Author: stomar (Marcus Stollsteimer)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
RDoc doesn't handle Document-method directives for `#[]` correctly. When multiple directives are given, "Document-method: []" shows up as a code block, at the beginning of the docs for the method of the directive before:

```
$ cat document-method-test.c 
/*
 * Document-method: foo
 * Document-method: []
 * Document-method: bar
 *
 * Does nothing.
 */
static VALUE
rb_my_method(void)
{

}

rb_cFoo = rb_define_class("Foo", rb_cObject);
rb_define_method(rb_cFoo, "foo", rb_my_method, 0);
rb_define_method(rb_cFoo, "bar", rb_my_method, 0);
rb_define_method(rb_cFoo, "[]", rb_my_method, 0);
```

The directive affects the docs for `#foo`:

```
$ rdoc --ri document-method-test.c -o mydoc
$ ri Foo.foo -d mydoc

Foo.foo

(from /.../.../mydoc)
------------------------------------------------------------------------------
  foo()

------------------------------------------------------------------------------

  Document-method: []

Does nothing.
```

When the order of the Document-method directives is changed, with `Document-method: []` as the first one, everything is rendered correctly.

Real life example: https://docs.ruby-lang.org/en/2.3.0/Proc.html#method-i-call




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-24 21:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-13275.20170303115909@ruby-lang.org>
2017-03-03 11:59 ` [ruby-core:79894] [Ruby trunk Bug#13275] RDoc bug for "Document-method: []" sto.mar
2017-06-03 11:57 ` [ruby-core:81558] " sto.mar
2019-06-24 21:34 ` [ruby-core:93345] " merch-redmine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).