mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Escape '/*' within block comment too
This commit is contained in:
parent
b6d0b3dfaf
commit
396e921044
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue