summaryrefslogtreecommitdiff
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_string.rb')
-rw-r--r--test/ruby/test_string.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index a35f6a3bb7..8366424c66 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -2252,6 +2252,17 @@ class TestString < Test::Unit::TestCase
assert_equal(:foo, s.send(:=~, /abc/))
assert_equal(:foo, s =~ /abc/, "should not use optimized instruction")
end
+
+ def test_LSHIFT_neary_long_max
+ return unless @cls == String
+ assert_ruby_status([], <<-'end;', '[ruby-core:61886] [Bug #9709]')
+ begin
+ a = "a" * 0x4000_0000
+ a << "a" * 0x1_0000
+ rescue NoMemoryError
+ end
+ end;
+ end
end
class TestString2 < TestString