Project

General

Profile

Actions

Bug #3512

closed

ri shows '__send__' incorrectly

Added by tomonacci (Tomo Kazahaya) almost 14 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2010-07-01 trunk 28495) [i686-linux]
Backport:

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, @attrs

    unmask_protected_sequences
    =end

Actions #1

Updated by tenderlovemaking (Aaron Patterson) almost 14 years ago

  • Assignee set to drbrain (Eric Hodel)

=begin

=end

Actions #2

Updated by Anonymous almost 14 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r28647.
Tomo, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0