Project

General

Profile

Bug #14450

Enchance MatchData docs

Added by zverok (Victor Shepelev) about 1 year ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
docs
Target version:
-
[ruby-core:85410]

Description

The wording is changed from stating something like "This is (unimporant) helper, which is a wrapper for (primary) global variables" more to the "This is (primary) regexp matching result, which also (eventually) related to global variables".

Explanations expanded and several code examples added to the class description.


Files

match-data-docs.patch (2.77 KB) match-data-docs.patch zverok (Victor Shepelev), 02/05/2018 05:51 PM

Associated revisions

Revision 3a637971
Added by naruse (Yui NARUSE) 2 months ago

Enchance MatchData docs [Bug #14450]

From: Victor Shepelev zverok.offline@gmail.com

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 66350
Added by naruse (Yui NARUSE) 2 months ago

Enchance MatchData docs [Bug #14450]

From: Victor Shepelev zverok.offline@gmail.com

Revision 66350
Added by naruse (Yui NARUSE) 2 months ago

Enchance MatchData docs [Bug #14450]

From: Victor Shepelev zverok.offline@gmail.com

History

Updated by shevegen (Robert A. Heiler) about 1 year ago

Actually your wording seems a bit more complicated than the original one to
me. Or perhaps I got used to the succinct japanese-english style already. :D

The content "It encapsulates all the results of a pattern match, results
normally accessed through the special variables $&, $',
$`, $1, $2, and so on." seems to
be gone or reworded and moved below (but mostly appears to be gone; aside
from the new overview at the bottom).

I agree with the examples listed though including the section "Global
variables equivalence". (I guess that was one way for you to re-group
the documentation, and I agree with that part of the patch - it seems
more logical.)

So the only part is the intro - perhaps the intro could still include
a reference to the old "results normally accessed through the special
variable" part? With the overview appearing lateron. At any rate,
this is just an opinion, feel free to ignore it - improving ruby's
documentation is always good and should in general be encouraged,
so consider my comment here more as an attempt of encouragement than
anything else, please.

Updated by naruse (Yui NARUSE) 9 months ago

  • Backport set to 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
  • Assignee set to docs
  • Tracker changed from Misc to Bug

Updated by hsbt (Hiroshi SHIBATA) 9 months ago

stomar (Marcus Stollsteimer)

I added you to docs group.
Can you proofread and commit this?

Thanks.

#4

Updated by hsbt (Hiroshi SHIBATA) 6 months ago

  • Status changed from Open to Assigned

Updated by zverok (Victor Shepelev) 2 months ago

Added by zverok (Victor Shepelev) 10 months ago.
Updated by hsbt (Hiroshi SHIBATA) 4 months ago

Sorry, is it possible to have this merged before 2.6 release? What can I do for it?..

#6

Updated by naruse (Yui NARUSE) 2 months ago

  • Status changed from Assigned to Closed

Applied in changeset trunk|r66350.


Enchance MatchData docs [Bug #14450]

From: Victor Shepelev zverok.offline@gmail.com

Updated by naruse (Yui NARUSE) 2 months ago

Adding examples looks nice, thank you for contributing.

Also available in: Atom PDF