Use char Arrays in on_call_translate().

When running a 1.9 based Ruby Enumerable doesn't have the method #[].
This commit is contained in:
Yorick Peterse 2014-08-26 20:41:16 +02:00
parent e288ab88f5
commit 29870c21f2
1 changed files with 2 additions and 2 deletions

View File

@ -1019,8 +1019,8 @@ module Oga
#
def on_call_translate(context, input, find, replace)
input_str = on_call_string(context, input)
find_chars = on_call_string(context, find).chars
replace_chars = on_call_string(context, replace).chars
find_chars = on_call_string(context, find).chars.to_a
replace_chars = on_call_string(context, replace).chars.to_a
replaced = input_str
find_chars.each_with_index do |char, index|