lib/ruby_parser/ruby_lexer.rb in brakeman-0.8.1 vs lib/ruby_parser/ruby_lexer.rb in brakeman-0.8.2
- old
+ new
@@ -725,10 +725,10 @@
return TOKENS[tok]
elsif src.scan(/\=begin(?=\s)/) then
# @comments << '=' << src.matched
@comments << src.matched
- unless src.scan(/.*?\n=end( |\t|\f)*[^(\n|\z)]*(\n|\z)/m) then
+ unless src.scan(/.*?\n=end( |\t|\f)*[^\n]*(\n|\z)/m) then
@comments.clear
rb_compile_error("embedded document meets end of file")
end
@comments << src.matched