mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
tool/prelude.c.tmpl: use RubyVM::CEscape
Do not repeat yourself.
This commit is contained in:
parent
b0eb5aa344
commit
acd8ee8dbc
Notes:
git
2020-08-11 16:51:33 +09:00
2 changed files with 8 additions and 20 deletions
|
@ -17,7 +17,7 @@ module RubyVM::CEscape
|
|||
|
||||
# generate comment, with escaps.
|
||||
def commentify str
|
||||
return "/* #{str.strip.b.gsub '*/', '*\\/'} */"
|
||||
return "/* #{str.b.gsub '*/', '*\\/'} */"
|
||||
end
|
||||
|
||||
# Mimic gensym of CL.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue