Bug #3512
closedri shows '__send__' incorrectly
Description
=begin
Since '_' is used as a word-based markup for emphasizing, Ri description of Object#send is broken:
% ri Object#send
Object#send
(from ruby core)¶
obj.send(symbol [, args...]) -> obj
obj.send(symbol [, args...]) -> obj
Invokes the method identified by symbol, passing it any arguments
specified. You can use send if the name send clashes with <-- should be 'can use send'
an existing method in obj.
class Klass
def hello(*args)
"Hello " + args.join(' ')
end
end
k = Klass.new
k.send :hello, "gentle", "readers" #=> "Hello gentle readers"
Following will fix the problem:
% git diff
diff --git a/lib/rdoc/markup/attribute_manager.rb b/lib/rdoc/markup/attribute_ma
index 5b9e070..37014b6 100644
--- a/lib/rdoc/markup/attribute_manager.rb
+++ b/lib/rdoc/markup/attribute_manager.rb
@@ -112,7 +112,7 @@ class RDoc::Markup::AttributeManager
# first do matching ones
tags = @matching_word_pairs.keys.join("")
- re = /(^|\W)([#{tags}])([#:\]?[\w./-]+?\S?)\2(\W|$)/
-
re = /(^|[^\w#{NULL}])([#{tags}])([#:\]?[\w./-]+?\S?)\2(\W|$)/
1 while str.gsub!(re) do
attr = @matching_word_pairs[$2]
@@ -228,8 +228,8 @@ class RDoc::Markup::AttributeManager@attrs = RDoc::Markup::AttrSpan.new @str.length
- convert_attrs @str, @attrs
convert_html @str, @attrs
-
convert_attrs @str, @attrs
convert_specials @str, @attrsunmask_protected_sequences
=end