diff options
author | Kazuhiro NISHIYAMA <[email protected]> | 2020-09-23 11:44:06 +0900 |
---|---|---|
committer | Kazuhiro NISHIYAMA <[email protected]> | 2020-09-23 11:44:06 +0900 |
commit | 9a8f5f0a9a1ed24a3dbb2f92cd267b77faf2da88 (patch) | |
tree | 2262dd832768eeb8b29194bc900b7da8632b6ca1 /string.c | |
parent | ba889100d850e973e519cebc48d5b4f1e8ab0034 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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+. |