diff options
author | wanabe <s.wanabe@gmail.com> | 2020-08-08 11:29:51 +0900 |
---|---|---|
committer | wanabe <s.wanabe@gmail.com> | 2020-10-16 08:37:04 +0900 |
commit | 65ae7f347a9b44c62ed68870c0a59fd333e6784d (patch) | |
tree | 65c8b3697ac3d1c997a8e76638b40021283e679d /test | |
parent | ce7a053475cbebfb2f3e5ed6614e0ba631541917 (diff) | |
download | ruby-65ae7f347a9b44c62ed68870c0a59fd333e6784d.tar.gz |
Adjust sp for `if true or ...`/`if false and ...`
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_syntax.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index ac2a0da9cd..64405a37e9 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -1514,6 +1514,11 @@ eom assert_valid_syntax("tap {a = (break unless true)}") end + def test_tautological_condition + assert_valid_syntax("def f() return if false and invalid; nil end") + assert_valid_syntax("def f() return unless true or invalid; nil end") + end + def test_argument_forwarding assert_valid_syntax('def foo(...) bar(...) end') assert_valid_syntax('def foo(...) end') |