aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc/test_rdoc_any_method.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-05 01:41:25 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-05 01:41:25 +0000
commitd42d6e690e3f553b971322eae783ac6b0d4d9692 (patch)
tree2004bf4517ee7b81466c300cf30092e62e65467e /test/rdoc/test_rdoc_any_method.rb
parent670c6e8ce9d4a12bb4832e10fab27365398649bf (diff)
downloadruby-d42d6e690e3f553b971322eae783ac6b0d4d9692.tar.gz
* lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(313287)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_any_method.rb')
-rw-r--r--test/rdoc/test_rdoc_any_method.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_any_method.rb b/test/rdoc/test_rdoc_any_method.rb
index 77acfbee17..90305807f8 100644
--- a/test/rdoc/test_rdoc_any_method.rb
+++ b/test/rdoc/test_rdoc_any_method.rb
@@ -334,6 +334,35 @@ method(a, b) { |c, d| ... }
assert_equal %w[a b c d], m.param_list
end
+ def test_param_list_empty_params_with_block
+ m = RDoc::AnyMethod.new nil, 'method'
+ m.parent = @c1
+
+ m.params = '()'
+ m.block_params = 'a, b'
+
+ assert_equal %w[a b], m.param_list
+ end
+
+ def test_param_list_ampersand_param_block_params
+ m = RDoc::AnyMethod.new nil, 'method'
+ m.parent = @c1
+
+ m.params = '(a, b, &block)'
+ m.block_params = 'c, d'
+
+ assert_equal %w[a b c d], m.param_list
+ end
+
+ def test_param_list_ampersand_param
+ m = RDoc::AnyMethod.new nil, 'method'
+ m.parent = @c1
+
+ m.params = '(a, b, &block)'
+
+ assert_equal %w[a b block], m.param_list
+ end
+
def test_param_seq
m = RDoc::AnyMethod.new nil, 'method'
m.parent = @c1