Project

General

Profile

Actions

Bug #6719

closed

Documentation Error for String.sub()

Added by blackwatertepes (Tyler Kuhn) over 12 years ago. Updated over 12 years ago.

Status:
Closed
Target version:
ruby -v:
1.9.2
Backport:
[ruby-core:46313]

Description

"Returns a copy of str with the first occurrence of pattern substituted for the second argument." should be "Returns a copy of str with the first occurrence of pattern replaced by the second argument."


Files

Updated by mame (Yusuke Endoh) over 12 years ago

  • Status changed from Open to Assigned

Updated by oscardelben (Oscar Del Ben) over 12 years ago

I think this needs to be resubmitted without all the reformatting.

Updated by drbrain (Eric Hodel) over 12 years ago

  • Priority changed from 3 to Normal
  • Target version set to 2.0.0

I don't see the change in this patch, just corruption of the indentation of string.c. Please configure your editor correctly:

https://bugs.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style

I will make the change without using your patch based on the description.

Actions #4

Updated by drbrain (Eric Hodel) over 12 years ago

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

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


  • string.c (rb_str_sub): Fixed wording of documentation to match the
    replacement operation. Minor cleanup of markup. [Bug #6719]
  • string.c (rb_str_sub_bang): Minor wording change for clarity, minor
    cleanup of markup.
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0