mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Import RDoc 3.5.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
918f625a5e
commit
cc2a16d94d
49 changed files with 2119 additions and 273 deletions
|
@ -60,11 +60,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
|
||||
|
||||
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue