Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ruby 3.4.0 branch coverage #1113

Open
bkuhlmann opened this issue Oct 31, 2024 · 2 comments
Open

Fix Ruby 3.4.0 branch coverage #1113

bkuhlmann opened this issue Oct 31, 2024 · 2 comments

Comments

@bkuhlmann
Copy link

bkuhlmann commented Oct 31, 2024

Why

Hello. 👋 With Ruby 3.4.0, Preview 2, I'm experiencing the following issue when running my RSpec test suite:

Assertion failed: (cursor >= list->start), function pm_newline_list_line_column, file pm_newline_list.c, line 93.
Abort trap: 6

How

To reproduce, run the following:

git clone https://github.com/bkuhlmann/core.git
cd core
bundle install
rspec

As a workaround, you can make SimpleCov work by doing the following:

  1. Within the core project directory, open spec/spec_helper.rb in your editor.
  2. Delete this line: enable_coverage :branch.
  3. Delete this line: minimum_coverage_by_file line: 95, branch: 95
  4. Save and exit your editor and then run: rspec

Notice the entire test suite runs as expected and there are no errors reported.

The issue seems to be with enabling branch coverage in Ruby 3.4.0. All of this works fine in Ruby 3.3.0, though.

Notes

Here's what I'm running:

  • Ruby: ruby 3.4.0preview2 (2024-10-07 master 32c733f57b) +YJIT +PRISM [arm64-darwin23.6.0]
  • SimpleCov: 0.22.0
  • RSpec: 3.13.0
@Earlopain
Copy link

This seems to be a ruby bug, I openend https://bugs.ruby-lang.org/issues/20866

@bkuhlmann
Copy link
Author

Ah, thanks. 🙇 Will track on Ruby Issues as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants