From bf571987ecdb9faf350ee3bcd772fca5a3e79f85 Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 3 Jul 2015 09:39:18 +0000 Subject: merge revision(s) 50671: [Backport #11192] * compile.c (iseq_compile_each): out of range NTH_REF is always nil. * parse.y (parse_numvar): check overflow of NTH_REF and range. [ruby-core:69393] [Bug #11192] * util.c (ruby_scan_digits): make public and add length parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@51122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_syntax.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 342186170f..7bfcfca0d2 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -421,6 +421,13 @@ eom assert_syntax_error('0...%w.', /unterminated string/, bug10957) end + def test_too_big_nth_ref + bug11192 = '[ruby-core:69393] [Bug #11192]' + assert_warn(/too big/, bug11192) do + eval('$99999999999999999') + end + end + private def not_label(x) @result = x; @not_label ||= nil end -- cgit v1.2.3