summaryrefslogtreecommitdiff
path: root/lib/rexml/source.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/source.rb')
-rw-r--r--lib/rexml/source.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/rexml/source.rb b/lib/rexml/source.rb
index 7251666160..f599d2276c 100644
--- a/lib/rexml/source.rb
+++ b/lib/rexml/source.rb
@@ -98,6 +98,10 @@ module REXML
@buffer == ""
end
+ def position
+ @orig.index( @buffer )
+ end
+
# @return the current line in the source
def current_line
lines = @orig.split
@@ -194,6 +198,10 @@ module REXML
super and ( @source.nil? || @source.eof? )
end
+ def position
+ @er_source.pos
+ end
+
# @return the current line in the source
def current_line
begin