I opened my loved irb console (Ruby 1.9.3) and I type this:
"101is5".to_i
And I get:
101
I am assuming this is the expected behavior, but I fail to see what would be the benefits of doing this? Why do we want a string with numbers and characters to succeed into the Integer casting?
If you want to get an error use
Integer("101is5")instead