diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-03-27 12:33:32 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-03-27 12:33:32 +0900 |
| commit | 9434506035c3fc01de55ac0bc8b75497f8b5df5f (patch) | |
| tree | 3920ca6a5080c60d79d5d79da165aa6eb340b73b /test | |
| parent | 5067e7b0640507b1b953609b53a00a1bf14042c1 (diff) | |
| download | mruby-9434506035c3fc01de55ac0bc8b75497f8b5df5f.tar.gz mruby-9434506035c3fc01de55ac0bc8b75497f8b5df5f.zip | |
allow underscores in integer literals; close #1960
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/string.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/t/string.rb b/test/t/string.rb index 445cf7439..04f90fb45 100644 --- a/test/t/string.rb +++ b/test/t/string.rb @@ -433,11 +433,13 @@ assert('String#to_i', '15.2.10.5.39') do b = '32143'.to_i c = 'a'.to_i(16) d = '100'.to_i(2) + e = '1_000'.to_i assert_equal 0, a assert_equal 32143, b assert_equal 10, c assert_equal 4, d + assert_equal 1_000, e end assert('String#to_s', '15.2.10.5.40') do |
