lib/rufus/tokyo/cabinet/util.rb
def norm (i)
      l = self.length
      case i
      when Range then ((i.first % l)..(i.last % l))
      when Array then [ i.first % l ]
      else i % l
      end
    end
def norm (i)
      l = self.length
      case i
      when Range then ((i.first % l)..(i.last % l))
      when Array then [ i.first % l ]
      else i % l
      end
    end
Makes sure this offset/range fits the size of the list