diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-10-26 09:01:27 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-10-26 09:01:27 +0900 |
commit | 396e92104474921ee58ff75ff63d3db0d503dacc (patch) | |
tree | a8b66fba9f81757f83fd3167780a98d7c052e51d | |
parent | b6d0b3dfaf5de60d9afacd18fcc9292973d1023a (diff) | |
download | ruby-396e92104474921ee58ff75ff63d3db0d503dacc.tar.gz |
Escape '/*' within block comment too
-rw-r--r-- | tool/ruby_vm/helpers/c_escape.rb | 2 |
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. |