Skip to content

Fix Ruby 3.2/3.3 compatibility in Fixnum test#142

Merged
davidcelis merged 1 commit intodavidcelis:masterfrom
slhck:fix-ruby-3.2-fixnum-tests
Nov 10, 2025
Merged

Fix Ruby 3.2/3.3 compatibility in Fixnum test#142
davidcelis merged 1 commit intodavidcelis:masterfrom
slhck:fix-ruby-3.2-fixnum-tests

Conversation

@slhck
Copy link
Copy Markdown
Contributor

@slhck slhck commented Nov 8, 2025

Replace Fixnum with Integer in spec/rails_spec.rb to fix test failures on Ruby 3.2 and 3.3.

Background:

  • Fixnum and Bignum were unified into Integer in Ruby 2.4
  • The test was monkey-patching Fixnum, which behaves differently in Ruby 3.2+
  • This caused the "default per page in model" test to fail for Kaminari and WillPaginate on Ruby 3.2/3.3

Changes:

  • Replace all instances of class Fixnum with class Integer
  • Add comment explaining the Ruby 2.4+ change
  • All tests now pass on Ruby 3.1, 3.2, and 3.3

Replace Fixnum with Integer in spec/rails_spec.rb to fix test failures
on Ruby 3.2 and 3.3.

Background:
- Fixnum and Bignum were unified into Integer in Ruby 2.4
- The test was monkey-patching Fixnum, which behaves differently in Ruby 3.2+
- This caused the "default per page in model" test to fail for Kaminari
  and WillPaginate on Ruby 3.2/3.3

Changes:
- Replace all instances of `class Fixnum` with `class Integer`
- Add comment explaining the Ruby 2.4+ change
- All tests now pass on Ruby 3.1, 3.2, and 3.3

Testing:
- Ruby 3.2.7: All Kaminari and WillPaginate tests pass
- Ruby 3.3.8: All Kaminari and WillPaginate tests pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@davidcelis davidcelis merged commit b0dd235 into davidcelis:master Nov 10, 2025
9 checks passed
@davidcelis
Copy link
Copy Markdown
Owner

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants