Bug #6719

Documentation Error for String.sub()

Added by Tyler Kuhn over 2 years ago. Updated over 2 years ago.

[ruby-core:46313]
Status:Closed
Priority:Normal
Assignee:Eric Hodel
ruby -v:1.9.2 Backport:

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."

0001-altered-documentation-for-String.sub-where-verbage-w.patch Magnifier (160 KB) Tyler Kuhn, 07/11/2012 06:47 AM

Associated revisions

Revision 36506
Added by Eric Hodel over 2 years ago

  • 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.

Revision 36506
Added by Eric Hodel over 2 years ago

  • 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.

History

#1 Updated by Yusuke Endoh over 2 years ago

  • Status changed from Open to Assigned

#2 Updated by Oscar Del Ben over 2 years ago

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

#3 Updated by Eric Hodel over 2 years ago

  • Priority changed from Low 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.

#4 Updated by Eric Hodel over 2 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.

Also available in: Atom PDF