ruby / ruby/power_assert

`power_assert` didn't show `.class` result sometimes with Ruby 3.4

Open
#53 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
202
Forks
27
Avg merge
2d 10h
Merged PRs (30d)
1

Description

I faced flaky result with Ruby 3.4.2 and power_assert.

https://github.com/hsbt/minitest-power_assert/actions/runs/13891945806/job/38865298257

# success
❯ rake test
Run options: --seed 18518

# Running:

.    assert { "0".class == "3".to_i.times.map {|i| i + 1 }.class }
                 |     |      |    |     |                |
                 |     |      |    |     |                Array
                 |     |      |    |     [1, 2, 3]
                 |     |      |    #<Enumerator: 3:times>
                 |     |      3
                 |     false
                 String
.......

Finished in 0.029726s, 269.1247 runs/s, 672.8117 assertions/s.

8 runs, 20 assertions, 0 failures, 0 errors, 0 skips
# failed 
❯ rake test
Run options: --seed 57838

# Running:

....    assert { "0".class == "3".to_i.times.map {|i| i + 1 }.class }
                       |      |    |     |
                       |      |    |     [1, 2, 3]
                       |      |    #<Enumerator: 3:times>
                       |      3
                       false
F...

Finished in 0.030614s, 261.3184 runs/s, 653.2959 assertions/s.

The above issue is happend with one out of every five fails.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with rake test on Ruby 3.4.2, using the assertion and successful and failed output shown here. Compare the generated power-assert output across repeated runs; done means the .class result is rendered consistently and the regression is covered by a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.