* bootstraptest/test_literal_suffix.rb: add two test cases to

examine that "1if true" and "1rescue nil" are recognized as 1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mrkn 2013-08-01 15:14:45 +00:00
Родитель da5e757237
Коммит ae0181b7fe
2 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Thu Aug 2 00:02:00 2013 Kenta Murata <mrkn@mrkn.jp>
* 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 <mrkn@mrkn.jp>
* rational.c (rb_flt_rationalize_with_prec): new public C function

Просмотреть файл

@ -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}