to_i(2)interprets the expression in the string as a binary number, which should consist only of "0"and "1". Since it is "98"not valid, the result becomes 0the default, by design. (Perhaps it was alternatively intended to return nilor raise the error, but somehow it was designed that way.)
, to_s(2), .
, .. , , . , .., , .