Skip to content

Commit

Permalink
Test for rb_define_method(..., -2)
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Jan 12, 2011
1 parent c43e6ab commit c4f876d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/test_rdoc_parser_c.rb
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,20 @@ def test_handle_method
assert_equal @top_level, m.file
end

def test_handle_method_args_minus_2
parser = util_parser "Document-method: BasicObject#==\n blah */"

parser.handle_method 'method', 'rb_cBasicObject', '==', 'rb_obj_equal', -2

bo = @top_level.find_module_named 'BasicObject'

assert_equal 1, bo.method_list.length

equals2 = bo.method_list.first

assert_equal '(*args)', equals2.params
end

def test_handle_method_args_0
parser = util_parser "Document-method: BasicObject#==\n blah */"

Expand Down

0 comments on commit c4f876d

Please sign in to comment.