aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-08-10 19:45:17 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-08-10 19:46:13 +0900
commit0ca6b973e89889f1ce0dbbc05da780cb75776bfe (patch)
tree409b6ffa30f2ab921944f2096eef361ea8953d25 /string.c
parent17d869c7d65534a18885162ea4daa78ade3254d6 (diff)
downloadruby-0ca6b973e89889f1ce0dbbc05da780cb75776bfe.tar.gz
Removed non-ASCII code to suppress warnings by localized compilers
Diffstat (limited to 'string.c')
-rw-r--r--string.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/string.c b/string.c
index c8deba7234..d4ec257e87 100644
--- a/string.c
+++ b/string.c
@@ -1585,8 +1585,8 @@ rb_str_resurrect(VALUE str)
*
* With the single argument +str+, returns a copy of +str+
* with the same encoding as +str+:
- * s = String.new('Que veut dire ça?')
- * s # => "Que veut dire ça?"
+ * s = String.new("Que veut dire \u{e7}a?")
+ * s # => "Que veut dire \u{e7}a?"
* s.encoding # => #<Encoding:UTF-8>
*
* Literal strings like <tt>""</tt> or here-documents always use
@@ -1634,8 +1634,8 @@ rb_str_resurrect(VALUE str)
* String.new(encoding: 'FOO')
*
* Raises an exception if the given +encoding+ is incompatible with +str+:
- * utf8 = 'Que veut dire ça?'
- * ascii = 'Que veut dire ça?'.force_encoding('ASCII')
+ * utf8 = "Que veut dire \u{e7}a?"
+ * ascii = "Que veut dire \u{e7}a?".force_encoding('ASCII')
* # Raises Encoding::CompatibilityError (incompatible character encodings: UTF-8 and US-ASCII)
* utf8.include? ascii
*