Rex::Text.refine: removed redundant Array operations
parent
0d2ad8734e
commit
33502b52b0
|
@ -242,13 +242,8 @@ module Text
|
|||
# get the words of the second str in an array
|
||||
o_words = to_words( str2 )
|
||||
|
||||
# get all the words that are different between the 2 arrays
|
||||
changes = s_words - o_words
|
||||
changes << s_words - o_words
|
||||
changes.flatten!
|
||||
|
||||
# get what hasn't changed (the rdiff, so to speak) as a string
|
||||
(s_words - changes).join
|
||||
(s_words - (s_words - o_words)).join
|
||||
end
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue