summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2020-09-23 11:44:06 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2020-09-23 11:44:06 +0900
commit9a8f5f0a9a1ed24a3dbb2f92cd267b77faf2da88 (patch)
tree2262dd832768eeb8b29194bc900b7da8632b6ca1 /string.c
parentba889100d850e973e519cebc48d5b4f1e8ab0034 (diff)
Fix call-seq [ci skip]
`encoding` can be not only an encoding name, but also an Encoding object. ``` s = String.new('foo', encoding: Encoding::US_ASCII) s.encoding # => #<Encoding:US-ASCII> ```
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 83fbf285c0..254e0bdefa 100644
--- a/string.c
+++ b/string.c
@@ -1567,7 +1567,7 @@ rb_str_resurrect(VALUE str)
/*
* call-seq:
* String.new(string = '') -> new_string
- * String.new(string = '', encoding: encoding _name) -> new_string
+ * String.new(string = '', encoding: encoding) -> new_string
* String.new(string = '', capacity: size) -> new_string
*
* Returns a new \String that is a copy of +string+.