diff --git a/ChangeLog b/ChangeLog index 0cabb99b18..4bb807ed66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Aug 2 00:02:00 2013 Kenta Murata + + * bootstraptest/test_literal_suffix.rb: add two test cases to + examine that "1if true" and "1rescue nil" are recognized as 1. + Thu Aug 1 23:45:00 2013 Kenta Murata * rational.c (rb_flt_rationalize_with_prec): new public C function diff --git a/bootstraptest/test_literal_suffix.rb b/bootstraptest/test_literal_suffix.rb index e466cfc5d2..29ce8e05b3 100644 --- a/bootstraptest/test_literal_suffix.rb +++ b/bootstraptest/test_literal_suffix.rb @@ -37,6 +37,8 @@ assert_equal '0+6/5i', '1.2ri' assert_equal 'Complex', '1.2ri.class' assert_equal '0+10.0i', '1e1i' assert_equal 'Complex', '1e1i.class' +assert_equal '1', '1if true' +assert_equal '1', '1rescue nil' assert_equal 'syntax error, unexpected tIDENTIFIER, expecting end-of-input', %q{begin eval('1ir', nil, '', 0); rescue SyntaxError => e; e.message[/\A:(?:\d+:)? (.*)/, 1] end}