summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-10-26 09:01:27 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-10-26 09:01:27 +0900
commit396e92104474921ee58ff75ff63d3db0d503dacc (patch)
treea8b66fba9f81757f83fd3167780a98d7c052e51d
parentb6d0b3dfaf5de60d9afacd18fcc9292973d1023a (diff)
Escape '/*' within block comment too
-rw-r--r--tool/ruby_vm/helpers/c_escape.rb2
1 files changed, 1 insertions, 1 deletions
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.