simplecov icon indicating copy to clipboard operation
simplecov copied to clipboard

Enabling branch coverage results in "LocalJumpError: break from proc-closure" errors

Open gettalong opened this issue 1 year ago • 0 comments

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

  1. git clone [email protected]:gettalong/hexapdf.git
  2. gem install geom2d
  3. cd hexapdf
  4. rake -> This should not result in any error
  5. Enable branch coverage by adding enable_coverage :branch in test/test_helper.rb at line 7
  6. 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

gettalong avatar Jul 26 '22 21:07 gettalong