After upgrading recently to brakeman 3.3.5
I am getting a similar exception on two files. One is app/helpers/profile_mailer
and the exception is
golf_mentor/app/helpers/profile_helper.rb:1 :: parse error on value ":" (tCOLON)
If I delete everything but the surrounding block, so the file becomes
module ProfilesHelper
end
I still get the same exception. If I delete everything in the file, I get the following exception:
undefined method `force_encoding' for nil:NilClass While processing app/helpers/profiles_helper.rb
Looking on stackoverflow, such an error is not reported for brakeman, but it appears to be reported for a number of other apps and is related to ruby 2.2
(I am running 2.2.1
).
The file permissions for this file are
-rw-r--r-- 1 Chris staff 4 16 Aug 19:57 profiles_helper.rb
How do I fix this?