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
This commit is contained in:
nobu 2017-03-07 09:13:41 +00:00
parent f4d13801b6
commit d69d98f61a
2 changed files with 6 additions and 2 deletions

View file

@ -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 # '<=>'