str_a = "the_quick_brown_fox"str_b = "the_quick_red_fox" puts (0...str_a.size).find {|i| str_a[i] != str_b[i] } || str_a.size
Standard input is empty
10
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!