summaryrefslogtreecommitdiff
path: root/lib/coderay/scanner.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/scanner.rb')
-rw-r--r--lib/coderay/scanner.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/coderay/scanner.rb b/lib/coderay/scanner.rb
index 64b3c83..cc1f665 100644
--- a/lib/coderay/scanner.rb
+++ b/lib/coderay/scanner.rb
@@ -181,7 +181,7 @@ module CodeRay
end
include Enumerable
- # The current line position of the scanner.
+ # The current line position of the scanner. See also #column.
#
# Beware, this is implemented inefficiently. It should be used
# for debugging only.
@@ -189,7 +189,10 @@ module CodeRay
string[0..pos].count("\n") + 1
end
- # The current column position of the scanner. See #line.
+ # The current column position of the scanner. See also #line.
+ #
+ # Beware, this is implemented inefficiently. It should be used
+ # for debugging only.
def column pos = self.pos
return 0 if pos <= 0
string = string()