diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-07 09:13:41 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-07 09:13:41 +0000 |
commit | d69d98f61a9e58b03ae2d8c195f0f97e8c04080a (patch) | |
tree | f275f03d35b08e67be82c7c18a3ba9d8d2d09466 /test | |
parent | f4d13801b620f55e886f3108f6f37ef386c4669d (diff) | |
download | ruby-d69d98f61a9e58b03ae2d8c195f0f97e8c04080a.tar.gz |
string.c: negation of LONG_MIN
* string.c (rb_str_update): do not use negation of LONG_MIN, which
is negative too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_string.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index da8bd5f05a..39cfc9a220 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -202,6 +202,8 @@ CODE assert_equal("fobar", s) assert_raise(ArgumentError) { "foo"[1, 2, 3] = "" } + + assert_raise(IndexError) {"foo"[RbConfig::Limits["LONG_MIN"]] = "l"} end def test_CMP # '<=>' |