From 2456df7584abf12c62a41f8e82bb2cb4bde202e3 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 13 Mar 2015 17:14:53 +0000 Subject: parse.y: empty paren * parse.y (primary): empty parentheses at cmdarg can be null. [ruby-core:68477] [Bug #10957] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_syntax.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 86c1090c30..ace5c8d46e 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -557,6 +557,12 @@ eom assert_syntax_error(src, /formal argument/, bug10545) end + def test_null_range_cmdarg + bug10957 = '[ruby-core:68477] [Bug #10957]' + assert_ruby_status(['-c', '-e', 'p ()..0'], "", bug10957) + assert_ruby_status(['-c', '-e', 'p ()...0'], "", bug10957) + end + private def not_label(x) @result = x; @not_label ||= nil end -- cgit v1.2.3