# File lib/inline.rb, line 186 def strip_comments(src) # strip c-comments src = src.gsub(%r%\s*/\*.*?\*/%m, '') # strip cpp-comments src = src.gsub(%r%^\s*//.*?\n%, '') src = src.gsub(%r%[ \t]*//[^\n]*%, '') src end