aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-07 09:13:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-07 09:13:41 +0000
commit11f74964bc72c235b01fd0018083d41b8c988339 (patch)
treef275f03d35b08e67be82c7c18a3ba9d8d2d09466 /test/ruby/test_string.rb
parent7017320f8bac809918117ffd4cf4f76e19fcf06c (diff)
downloadruby-11f74964bc72c235b01fd0018083d41b8c988339.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/ruby/test_string.rb')
-rw-r--r--test/ruby/test_string.rb2
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 # '<=>'