Method: Integer#===
- Defined in:
- numeric.c
#==(other) ⇒ Boolean
Returns true if int equals other numerically. Contrast this with Integer#eql?, which requires other to be an Integer.
1 == 2 #=> false
1 == 1.0 #=> true
4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 |
# File 'numeric.c', line 4162 VALUE rb_int_equal(VALUE x, VALUE y) { if (FIXNUM_P(x)) { return fix_equal(x, y); } else if (RB_TYPE_P(x, T_BIGNUM)) { return rb_big_eq(x, y); } return Qnil; } |