Fix error on Rubinius

This commit is contained in:
Junegunn Choi 2013-12-26 01:43:20 +09:00
parent bff7e9edf5
commit 39eb85596c

5
fzf
View File

@ -556,8 +556,7 @@ class FZF
if new_search && !lists.empty?
q, cx = events.delete(:key) || [q, 0]
empty = matcher.empty?(q)
matches = fcache[q] ||=
begin
unless matches = fcache[q]
found = []
skip = false
cnt = 0
@ -574,7 +573,7 @@ class FZF
matcher.match(list, q, q[0, cx], q[cx..-1]))
end
next if skip
@sort ? found : found.reverse
matches = fcache[q] = @sort ? found : found.reverse
end
if !empty && @sort && matches.length <= @sort