Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
RubyVM::YJIT.format_number
format_number(pad, number)
yjit.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/yjit.rb, line 476
def format_number(pad, number)
s = number.to_s
i = s.index('.') || s.size
s.insert(i -= 3, ',') while i > 3
s.rjust(pad, ' ')
end
Format large numbers with comma separators for readability