Ruby 3.3 リファレンスマニュアル

instance method Integer#divmod

divmod(other) -> [Integer, Numeric]Ruby 2.4.0 から[permalink][rdoc][edit]

selfother で割った商 q と余り r を、[q, r] という 2 要素の配列にして返します。 商 q は常に整数ですが、余り r は整数であるとは限りません。

[PARAM] other:
self を割る数。

[SEE_ALSO] Numeric#divmod