summaryrefslogtreecommitdiff
path: root/lib/rexml/node.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/node.rb')
-rw-r--r--lib/rexml/node.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/rexml/node.rb b/lib/rexml/node.rb
index e5dec72a9d..7226e5be6c 100644
--- a/lib/rexml/node.rb
+++ b/lib/rexml/node.rb
@@ -55,10 +55,8 @@ module REXML
return nil
end
- # Returns the index that +self+ has in its parent's elements array, so that
- # the following equation holds true:
- #
- # node == node.parent.elements[node.index_in_parent]
+ # Returns the position that +self+ holds in its parent's array, indexed
+ # from 1.
def index_in_parent
parent.index(self)+1
end