diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-26 16:14:19 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-26 16:14:19 +0000 |
commit | c42a631063e79fab2369c1983a6f2a075b584f62 (patch) | |
tree | 2ea8c0381d5d491a5f46e210239e1494df57d240 /lib/rdoc/ri/driver.rb | |
parent | 2142a5af51ce882641a060e69bc58c7322ff5188 (diff) | |
download | ruby-c42a631063e79fab2369c1983a6f2a075b584f62.tar.gz |
Import RDoc 2.0.0 r56.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/ri/driver.rb')
-rw-r--r-- | lib/rdoc/ri/driver.rb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb index b254d3574f..7ac2e0f15c 100644 --- a/lib/rdoc/ri/driver.rb +++ b/lib/rdoc/ri/driver.rb @@ -344,7 +344,11 @@ Options may also be set in the 'RI' environment variable. end def read_yaml(path) - YAML.load File.read(path).gsub(/ \!ruby\/(object|struct):(RDoc::RI|RI|SM).*/, '') + data = File.read path + data = data.gsub(/ \!ruby\/(object|struct):(RDoc::RI|RI).*/, '') + data = data.gsub(/ \!ruby\/(object|struct):SM::(\S+)/, + ' !ruby/\1:RDoc::Markup::\2') + YAML.load data end def get_info_for(arg) @@ -418,7 +422,7 @@ Options may also be set in the 'RI' environment variable. end -class Hash +class Hash # HACK don't add stuff to Hash. def method_missing method, *args self[method.to_s] end @@ -428,7 +432,12 @@ class Hash if self[k] then case v when Array then - self[k] += v + # HACK dunno + if String === self[k] and self[k].empty? then + self[k] = v + else + self[k] += v + end when Hash then self[k].merge! v else |