Project

General

Profile

Bug #6526

minor typo in Regexp class documentation

Added by nathanst (Nathan Stratton Treadway) about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
1.9.3
Backport:
[ruby-core:45360]

Description

In the "Performance" section of the Regexp class documentation, the intro to the first sample code block says "Consider a string of 25 as, a d, 4 as, and a c."

However, as the return value given in that sample block makes clear, there are actually four d characters in the string; it might make sense for the intro line to read "Consider a string of 25 as, 4 da pairs, and a c.", or something like that.

(Also, that sample expression could be slightly simplied to: s = 'a' * 25 + 'da' * 4 + 'c' )

Nathan


Related issues

Is duplicate of Ruby master - Bug #5624: Mismatch between code example and its description in text in Regexp documentationCloseddrbrain (Eric Hodel)11/13/2011Actions

Updated by drbrain (Eric Hodel) about 8 years ago

  • Category set to doc
  • Status changed from Open to Closed
  • Assignee set to drbrain (Eric Hodel)
  • Priority changed from 3 to Normal

This is a duplicate of #5624 and was fixed by r33976

Also available in: Atom PDF