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
_ and seeing only one object. Ruby is not concatenating two objects.