markbates/cover_me

UTF issue

ari opened this issue · 4 comments

ari commented

/Users/ari/.rvm/gems/ruby-1.9.2-p0/gems/cover_me-1.0.0.rc3/lib/cover_me/results.rb:9:in eval': exit (SyntaxError) (eval):1: Invalid char\x1F' in expression
(eval):1: invalid multibyte char (UTF-8)
from /Users/ari/.rvm/gems/ruby-1.9.2-p0/gems/cover_me-1.0.0.rc3/lib/cover_me/results.rb:9:in read_results' from /Users/ari/.rvm/gems/ruby-1.9.2-p0/gems/cover_me-1.0.0.rc3/lib/cover_me/results.rb:16:inmerge_results!'
from /Users/ari/.rvm/gems/ruby-1.9.2-p0/gems/cover_me-1.0.0.rc3/lib/cover_me.rb:44:in `block in <top (required)>'

I can't tell which file in my project is causing this, but I don't get any errors from a normal test run without cover_me.

I have the same problem in 1.0.0.rc4:

/home/jon/.rvm/gems/ruby-1.9.2-p0/gems/cover_me-1.0.0.rc4/lib/cover_me/results.rb:9:in `eval': (eval):1: Invalid char `\x1F' in expression (SyntaxError) (eval):1: invalid multibyte char (UTF-8)
from /home/jon/.rvm/gems/ruby-1.9.2-p0/gems/cover_me-1.0.0.rc4/lib/cover_me/results.rb:9:in `read_results'
from /home/jon/.rvm/gems/ruby-1.9.2-p0/gems/cover_me-1.0.0.rc4/lib/cover_me/results.rb:16:in `merge_results!'
from /home/jon/.rvm/gems/ruby-1.9.2-p0/gems/cover_me-1.0.0.rc4/lib/cover_me.rb:44:in `block in <top (required)>'

However, it does not occur in 1.0.0.rc2.

I had this issue too. I think it is caused by an old coverage.data file. I deleted mine and now it works.

i second primerano.
removing coverage.data and coverage folder fixed the problem.

I had the same issue and fixed it the same way.