aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/code_object.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-02 00:32:30 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-02 00:32:30 +0000
commitcc2a16d94d744d14d4a5eb06eca22137f8a9b79e (patch)
tree2907a20e2d9ae3a2831707056bb3fe2d384b066d /lib/rdoc/code_object.rb
parent918f625a5eeba35b9b191cb39c1d634b4cc7efee (diff)
downloadruby-cc2a16d94d744d14d4a5eb06eca22137f8a9b79e.tar.gz
Import RDoc 3.5.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/code_object.rb')
-rw-r--r--lib/rdoc/code_object.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/rdoc/code_object.rb b/lib/rdoc/code_object.rb
index 02b2f2fcf6..3a8adfab67 100644
--- a/lib/rdoc/code_object.rb
+++ b/lib/rdoc/code_object.rb
@@ -61,11 +61,23 @@ class RDoc::CodeObject
attr_reader :force_documentation
##
+ # Line in #file where this CodeObject was defined
+
+ attr_accessor :line
+
+ ##
# Hash of arbitrary metadata for this CodeObject
attr_reader :metadata
##
+ # Offset in #file where this CodeObject was defined
+ #--
+ # TODO character or byte?
+
+ attr_accessor :offset
+
+ ##
# Our parent CodeObject
attr_accessor :parent
@@ -115,6 +127,12 @@ class RDoc::CodeObject
if comment and not comment.empty? then
normalize_comment comment
else
+ # TODO is this sufficient?
+ # HACK correct fix is to have #initialize create @comment
+ # with the correct encoding
+ if Object.const_defined? :Encoding and @comment.empty? then
+ @comment.force_encoding comment.encoding
+ end
@comment
end
end