# File lib/snmp/varbind.rb, line 207 def index(parent_tree) parent_tree = make_object_id(parent_tree) if not subtree_of?(parent_tree) raise ArgumentError, "#{self.to_s} not a subtree of #{parent_tree.to_s}" elsif self.length == parent_tree.length raise ArgumentError, "OIDs are the same" else ObjectId.new(self[parent_tree.length..-1]) end end