simplecov
simplecov copied to clipboard
Enabling branch coverage results in "LocalJumpError: break from proc-closure" errors
I tried enabling branch coverage in my test suite for HexaPDF. Once I do this there are multiple errors of the form "LocalJumpError: break from proc-closure". Without branch coverage everything is working fine.
The place where this error happens is always the same: https://github.com/gettalong/hexapdf/blob/master/lib/hexapdf/type/acro_form/form.rb#L151
How to reproduce
-
git clone [email protected]:gettalong/hexapdf.git
-
gem install geom2d
-
cd hexapdf
-
rake
-> This should not result in any error - Enable branch coverage by adding
enable_coverage :branch
intest/test_helper.rb
at line 7 -
rake
-> Now there should be 11 errors.
More Information
-
ruby -e "puts RUBY_DESCRIPTION
-> ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-linux] - Running the latest simplecov version 0.21.2