summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--string.c19
-rw-r--r--version.h2
2 files changed, 11 insertions, 10 deletions
diff --git a/string.c b/string.c
index 1db7acc8c8..1777125b2b 100644
--- a/string.c
+++ b/string.c
@@ -3155,13 +3155,13 @@ rb_str_concat_literals(size_t num, const VALUE *strary)
/*
* call-seq:
- * string.concat(*objects) -> new_string
+ * string.concat(*objects) -> string
*
- * Returns a new \String containing the concatenation
- * of +self+ and all objects in +objects+:
+ * Concatenates each object in +objects+ to +self+ and returns +self+:
*
* s = 'foo'
* s.concat('bar', 'baz') # => "foobarbaz"
+ * s # => "foobarbaz"
*
* For each given object +object+ that is an \Integer,
* the value is considered a codepoint and converted to a character before concatenation:
@@ -3193,12 +3193,13 @@ rb_str_concat_multi(int argc, VALUE *argv, VALUE str)
/*
* call-seq:
- * string << object -> str
+ * string << object -> string
+ *
+ * Concatenates +object+ to +self+ and returns +self+:
*
- * Returns a new \String containing the concatenation
- * of +self+ and +object+:
* s = 'foo'
* s << 'bar' # => "foobar"
+ * s # => "foobar"
*
* If +object+ is an \Integer,
* the value is considered a codepoint and converted to a character before concatenation:
@@ -3273,12 +3274,12 @@ rb_str_concat(VALUE str1, VALUE str2)
/*
* call-seq:
- * string.prepend(*other_strings) -> str
+ * string.prepend(*other_strings) -> string
*
- * Returns a new \String containing the concatenation
- * of all given +other_strings+ and +self+:
+ * Prepends each string in +other_strings+ to +self+ and returns +self+:
* s = 'foo'
* s.prepend('bar', 'baz') # => "barbazfoo"
+ * s # => "barbazfoo"
*
* Related: String#concat.
*/
diff --git a/version.h b/version.h
index 6903a7c682..e3c26230f6 100644
--- a/version.h
+++ b/version.h
@@ -12,7 +12,7 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 4
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 161
+#define RUBY_PATCHLEVEL 162
#define RUBY_RELEASE_YEAR 2021
#define RUBY_RELEASE_MONTH 12