Skip to content

Commit

Permalink
Merge 5bbe37e into 26f295b
Browse files Browse the repository at this point in the history
  • Loading branch information
shinjiikeda committed Feb 20, 2019
2 parents 26f295b + 5bbe37e commit 0aa8f7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/rambling/trie/nodes/raw.rb
Expand Up @@ -39,23 +39,23 @@ def new_node letter
end

def partial_word_chars? chars = []
letter = chars.slice!(0).to_sym
letter = chars.shift.to_sym
child = children_tree[letter]
return false unless child

child.partial_word? chars
end

def word_chars? chars = []
letter = chars.slice!(0).to_sym
letter = chars.shift.to_sym
child = children_tree[letter]
return false unless child

child.word? chars
end

def closest_node chars
letter = chars.slice!(0).to_sym
letter = chars.shift.to_sym
child = children_tree[letter]
return missing unless child

Expand All @@ -67,7 +67,7 @@ def children_match_prefix chars

return if chars.empty?

letter = chars.slice!(0).to_sym
letter = chars.shift.to_sym
child = children_tree[letter]

return unless child
Expand Down

0 comments on commit 0aa8f7c

Please sign in to comment.