зеркало из https://github.com/github/ruby.git
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> ```
This commit is contained in:
Родитель
ba889100d8
Коммит
9a8f5f0a9a
2
string.c
2
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+.
|
||||
|
|
Загрузка…
Ссылка в новой задаче