End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
BigDecimal#<=
self <= other → true or false
ext/bigdecimal/bigdecimal.c
View on GitHub ↗
static VALUE
BigDecimal_le(VALUE self, VALUE r)
{
return BigDecimalCmp(self, r, 'L');
}
Returns true if self is less or equal to than other, false otherwise:
Example
b = BigDecimal('1.5') # => 0.15e1 b <= 2 # => true b <= 2.0 # => true b <= Rational(2, 1) # => true b <= 1.5 # => true b < 1 # => false
Raises an exception if the comparison cannot be made.