1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

RubyVM::CEscape#rstring2cstr: do not escape '

A single quote "is representable either by itself or by the escape
sequence", according to ISO/IEC 9899 (checked all versions).  So this is
not a bug fix.  But the generated output is a bit readable without
backslashes.
This commit is contained in:
卜部昌平 2020-08-11 11:36:48 +09:00
parent d43e99b722
commit b0eb5aa344
Notes: git 2020-08-11 16:51:33 +09:00

View file

@ -60,7 +60,7 @@ module RubyVM::CEscape
"\x18"=>"\\x18", "\x19"=>"\\x19", "\x1A"=>"\\x1a", "\e"=>"\\x1b",
"\x1C"=>"\\x1c", "\x1D"=>"\\x1d", "\x1E"=>"\\x1e", "\x1F"=>"\\x1f",
" "=> " ", "!"=> "!", "\""=> "\\\"", "#"=> "#",
"$"=> "$", "%"=> "%", "&"=> "&", "'"=> "\\'",
"$"=> "$", "%"=> "%", "&"=> "&", "'"=> "'",
"("=> "(", ")"=> ")", "*"=> "*", "+"=> "+",
","=> ",", "-"=> "-", "."=> ".", "/"=> "/",
"0"=> "0", "1"=> "1", "2"=> "2", "3"=> "3",