From 396e92104474921ee58ff75ff63d3db0d503dacc Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 26 Oct 2020 09:01:27 +0900 Subject: [PATCH] Escape '/*' within block comment too --- tool/ruby_vm/helpers/c_escape.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/ruby_vm/helpers/c_escape.rb b/tool/ruby_vm/helpers/c_escape.rb index e9a8da6e50..34fafd1e34 100644 --- a/tool/ruby_vm/helpers/c_escape.rb +++ b/tool/ruby_vm/helpers/c_escape.rb @@ -17,7 +17,7 @@ module RubyVM::CEscape # generate comment, with escaps. def commentify str - return "/* #{str.b.gsub '*/', '*\\/'} */" + return "/* #{str.b.gsub('*/', '*\\/').gsub('/*', '/\\*')} */" end # Mimic gensym of CL.