KMP searching algorithm in mruby