Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@
# - #<<: Returns +self+ concatenated with a given string or integer.
# - #append_as_bytes: Returns +self+ concatenated with strings without performing any
# encoding validation or conversion.
# - #prepend: Prefixes to +self+ the concatenation of given other strings.
#
# _Substitution_
#
Expand Down Expand Up @@ -448,7 +449,6 @@
# - #+: Returns the concatenation of +self+ and a given other string.
# - #center: Returns a copy of +self+, centered by specified padding.
# - #concat: Returns the concatenation of +self+ with given other strings.
# - #prepend: Returns the concatenation of a given other string with +self+.
# - #ljust: Returns a copy of +self+ of a given length, right-padded with a given other string.
# - #rjust: Returns a copy of +self+ of a given length, left-padded with a given other string.
#
Expand Down
11 changes: 5 additions & 6 deletions string.c
Original file line number Diff line number Diff line change
Expand Up @@ -4086,15 +4086,14 @@ rb_ascii8bit_appendable_encoding_index(rb_encoding *enc, unsigned int code)

/*
* call-seq:
* prepend(*other_strings) -> string
* prepend(*other_strings) -> new_string
*
* Prepends each string in +other_strings+ to +self+ and returns +self+:
* Prefixes to +self+ the concatenation of the given +other_strings+; returns +self+:
*
* s = 'foo'
* s.prepend('bar', 'baz') # => "barbazfoo"
* s # => "barbazfoo"
* 'baz'.prepend('foo', 'bar') # => "foobarbaz"
*
* Related: see {Modifying}[rdoc-ref:String@Modifying].
*
* Related: String#concat.
*/

static VALUE
Expand Down