diff options
Diffstat (limited to 'test/t/syntax.rb')
| -rw-r--r-- | test/t/syntax.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/t/syntax.rb b/test/t/syntax.rb index 883cbd1ba..603547c7c 100644 --- a/test/t/syntax.rb +++ b/test/t/syntax.rb @@ -471,6 +471,10 @@ this is a comment that has extra after =begin and =end with tabs after it end assert 'keyword arguments' do + def m(a, b:1) [a, b] end + assert_equal [1, 1], m(1) + assert_equal [1, 2], m(1, b: 2) + def m(a, b:) [a, b] end assert_equal [1, 2], m(1, b: 2) assert_raise(ArgumentError) { m b: 1 } |
