Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDoc should be able to reference getter/setter methods #191

Closed
zzak opened this issue Feb 26, 2013 · 1 comment
Closed

RDoc should be able to reference getter/setter methods #191

zzak opened this issue Feb 26, 2013 · 1 comment

Comments

@zzak
Copy link
Member

zzak commented Feb 26, 2013

I think similar to #164 RDoc should be able to reference #[] and #[]=.

I tried writing a similar test, but for some reason it actually passes:

diff --git a/test/test_rdoc_cross_reference.rb b/test/test_rdoc_cross_reference.rb
index ecb5f9a..c01225a 100644
--- a/test/test_rdoc_cross_reference.rb
+++ b/test/test_rdoc_cross_reference.rb
@@ -144,6 +144,20 @@ class TestRDocCrossReference < XrefTestCase
     assert_ref m, '==='
   end

+  def test_resolve_method_getter
+    m = RDoc::AnyMethod.new '', '[]'
+    @c1.add_method m
+
+    assert_ref m, '[]'
+  end
+
+  def test_resolve_method_setter
+    m = RDoc::AnyMethod.new '', '[]='
+    @c1.add_method m
+
+    assert_ref m, '[]='
+  end
+

Maybe I'm missing something.

drbrain added a commit that referenced this issue Jun 28, 2013
@drbrain
Copy link
Member

drbrain commented Jun 28, 2013

Fixed by @ 4943d20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants