From b0eb5aa34476636771a6bfa1397115011066c410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Tue, 11 Aug 2020 11:36:48 +0900 Subject: 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. --- tool/ruby_vm/helpers/c_escape.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tool') diff --git a/tool/ruby_vm/helpers/c_escape.rb b/tool/ruby_vm/helpers/c_escape.rb index fa3cb8b1aa..a3368b8cc9 100644 --- a/tool/ruby_vm/helpers/c_escape.rb +++ b/tool/ruby_vm/helpers/c_escape.rb @@ -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", -- cgit v1.2.3