Why this expression evaluating to 13 ?.
I accidentally evaluated this expression (1_2).next instead of (1+2).next which o/p 4 as result.
=> (1_2).next
=> 13
Please let me know how this is, as i m new to Ruby
Ruby allows you to use _ to break up long numbers, for example
123456789 == 123_456_789
but the latter is a little easier to read, so your code is the same as 12.next
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