Accept right-aligned numerics
Author: forthrinCreated Jun 13, 2026Updated Sep 18, 2026
Labelsbug
Before submitting
- I have searched the existing issues and this hasn't been reported yet.
- I am running the latest stable version of RuboCop.
Issue type
False positive
Cop name
Layout/SpaceAroundOperators
Steps to reproduce the problem
if a < 1 then 2
elsif a < 3 then a <▒ 4 + 20
elsif a < 10 then a < 10 +▒ 5
endExpected behavior
Accept right-aligned numbers.
Actual behavior
Is the parser single-pass, no-look-ahead? Then this might be partially impossible.
RuboCop configuration
RuboCop version
System Version: macOS 26.5.1 (25F80)
Model Identifier: MacBookAir10,1
ruby 4.0.5 (2026-05-20 revision 64336ffd0e) +PRISM [arm64-darwin25]
rubocop 2026-06-13 377d9ed06Source: rubocop/rubocop