app/server/vendor/hamster/lib/hamster/trie.rb
# Returns a replacement instance after removing the specified entry. If empty, returns <tt>nil</tt>
Returns a replacement instance after removing the specified entry. If empty, returns nil
Returns a replacement instance after removing the specified entry . If empty returns nil
def delete_at(index = @entries.index { |e| e })
      yield(@entries[index]) if block_given?
      if size > 1
        entries = @entries.dup
        child = @children[index]
        if child
          children = @children.dup
          children[index] = child.delete_at do |entry|
            entries[index] = entry
          end
        else
          entries[index] = nil
        end
        self.class.new(@significant_bits, @size - 1, entries, children || @children)
      end
    end
def delete_at ( index = @entries . index { | e | e } ) yield ( @entries [ index ] ) if block_given? if size > 1 entries = @entries . dup child = @children [ index ] if child children = @children . dup children [ index ] = child . delete_at do | entry | entries [ index ] = entry end else entries [ index ] = nil end self . class . new ( @significant_bits , @size - 1 , entries , children || @children ) end end
Returns a replacement instance after removing the specified entry.
Returns a replacement instance after removing the specified entry .
index
<not_specific>
e
<not_specific>