diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-01-02 10:06:16 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-01-02 10:41:24 +0900 |
commit | 34bc15c86b764e8fdd11d9af8ad3dc401f24b5c4 (patch) | |
tree | 378be71f51698704ae6b89081b916670b8e5bd11 /test/ruby | |
parent | 076f24c2278c9718c4e2b23bfb946b960fafa468 (diff) |
Check Module#ruby2_keywords arity
It is considered a mistake, because calling this method with no
arguments has no effect.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2806
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_keyword.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb index bbf3953c17..c3a3a450f1 100644 --- a/test/ruby/test_keyword.rb +++ b/test/ruby/test_keyword.rb @@ -2724,6 +2724,12 @@ class TestKeywordArguments < Test::Unit::TestCase end def test_ruby2_keywords + assert_raise(ArgumentError) do + Class.new do + ruby2_keywords + end + end + c = Class.new do ruby2_keywords def foo(meth, *args) send(meth, *args) |