Invalid octal digit error in Ruby, how do I by pass that? I have a number, 0962833
, which I need to send to an API but I can't send it since I get this invalid octal digit error.
I need a work around for that without turning that number into a string, the zero can't be removed, it's a must.
Octal numbers use the digits 0 to 7. Maybe the error could be the digit 9, and digit 8 in your number. If you want to pass the number '962833', try converting it first to a correct octal number with an online converter. Then add the leading '0' and pass it to your function.
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