From 9a8f5f0a9a1ed24a3dbb2f92cd267b77faf2da88 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Wed, 23 Sep 2020 11:44:06 +0900 Subject: [PATCH] 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 # => # ``` --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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+.