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:
parent
e288ab88f5
commit
29870c21f2
|
@ -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|
|
||||
|
|
Loading…
Reference in New Issue