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

instance method Numeric#ceil

ceil -> Integer[permalink][rdoc][edit]
() → Integer
(Integer digits) → (Integer | Numeric)

self と等しいかより大きな整数のうち最小のものを返します。

Complex では未定義化されています。

p 1.ceil      # => 1
p 1.2.ceil    # => 2
p (-1.2).ceil # => -1
p (-1.5).ceil # => -1

[SEE_ALSO] Numeric#floor, Numeric#round, Numeric#truncate