Like C , does ruby have signed and unsigned integers and if it does then does that mean length method of String class return signed integer ? (Since in C integer if not specified implies signed)
Ruby implements integers in such a way that the distinction signed/unsigned is irrelevant, as Ruby integers extend automatically into BigNum (arbitrary length integers) when applicable.
This effectively prevents integer overflow, which is IMHO the main reason why people care about signedness in languages with fixed-size integers like C.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With