From: El_Hoy Date: 2014-08-10T20:56:14-03:00 Subject: [ruby-core:64292] Re: [ruby-trunk - Bug #10105] [Assigned] Mixed styles for class methods on Tempfile break RDocs. --e89a8f6433662f144f05004f30bd Content-Type: text/plain; charset=UTF-8 I've tried to fix it only touching documentation, and it seems to be impossible, rdoc does not understand the `class << self` syntax (I understand rdoc in this point, ruby is not easy to parse). I've added an issue in Rdoc for it ( https://github.com/rdoc/rdoc/issues/317 ). So the Tempfile.open method needs to be redefined to be understand by rdoc. I've updated the pull request with the minimal change that will fix the issue **I don't like it** as it define class methods outside of the class itself (so the source is harder to read), and it hardcode the class name two times (that I think is ugly). I quite not understand why there is so much resistance to refactor the code for readability. --- Eloy 2014-08-07 21:36 GMT-03:00 : > Issue #10105 has been updated by Zachary Scott. > > Status changed from Third Party's Issue to Assigned > Assignee changed from Eric Hodel to Zachary Scott > > This may be a bug in RDoc, but we can fix it without redefining the > methods by using the document method directive: > > See > http://docs.seattlerb.org/rdoc/RDoc/Parser/Ruby.html#class-RDoc::Parser::Ruby-label-Metaprogrammed+Methods > > Could you send a patch for this instead? > > ---------------------------------------- > Bug #10105: Mixed styles for class methods on Tempfile break RDocs. > https://bugs.ruby-lang.org/issues/10105#change-48241 > > * Author: Eloy Esp > * Status: Assigned > * Priority: Normal > * Assignee: Zachary Scott > * Category: doc > * Target version: > * ruby -v: 2.1.1 > * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN > ---------------------------------------- > I've already made a little pull request here > https://github.com/ruby/ruby/pull/691. > > The diff is here: https://github.com/ruby/ruby/pull/691.diff > > But to make the real changes clear is it better to ignore white-space (as > there are many indentation changes). > > Changes ignoring white-space: > https://github.com/ruby/ruby/pull/691/files?w=1 > > Regards. > > > > -- > https://bugs.ruby-lang.org/ > --e89a8f6433662f144f05004f30bd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I've tried to fix it only touching documentation, and it seems to be = impossible, rdoc does not understand the `class << self` syntax (I un= derstand rdoc in this point, ruby is not easy to parse). I've added an = issue in Rdoc for it ( = https://github.com/rdoc/rdoc/issues/317 ).

So the Tempfile.open method needs to be redefined to be understand by r= doc.

I've updated the pull request with the minimal change that will fix = the issue **I don't like it** as it define class methods outside of the= class itself (so the source is harder to read), and it hardcode the class = name two times (that I think is ugly).

I qui= te not understand why there is so much resistance to refactor the code for = readability.



---=C2=A0 Eloy


2014-08-07 21:36 GMT-03:00 <e@zzak.io><= /span>:
Issue #10105 has been updated by Zachary Scott.

Status changed from Third Party's Issue to Assigned
Assignee changed from Eric Hodel to Zachary Scott

This may be a bug in RDoc, but we can fix it without redefining the methods= by using the document method directive:

See http://do= cs.seattlerb.org/rdoc/RDoc/Parser/Ruby.html#class-RDoc::Parser::Ruby-label-= Metaprogrammed+Methods

Could you send a patch for this instead?

----------------------------------------
Bug #10105: Mixed styles for class methods on Tempfile break RDocs.
https://bugs.ruby-lang.org/issues/10105#change-48241

* Author: Eloy Esp
* Status: Assigned
* Priority: Normal
* Assignee: Zachary Scott
* Category: doc
* Target version:
* ruby -v: 2.1.1
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
I've already made a little pull request here https://github.com/ruby/ruby/pull= /691.

The diff is here: https://github.com/ruby/ruby/pull/691.diff

But to make the real changes clear is it better to ignore white-space (as t= here are many indentation changes).

Changes ignoring white-space: https://github.com/ruby/ruby/pull/691/fi= les?w=3D1

Regards.



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

--e89a8f6433662f144f05004f30bd--