1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

5 commits

Author SHA1 Message Date
nagachika
92846db686 merge revision(s) cd4f5b13228879d954fa97b6aa479c4a5ef4fb0a,8db269edb3550a85dfab9b193ea115ca36912ced,ab63f6d8543903f177c46634f38e5428655f003b: [Backport #18140]
Guard array when appending

	This prevents early collection of the array.  The GC doesn't see the
	array on the stack when Ruby is compiled with optimizations enabled

	[ruby-core:105099] [Bug #18140]
	---
	 array.c                 | 1 +
	 test/ruby/test_array.rb | 6 ++++++
	 2 files changed, 7 insertions(+)

	Guard array when appending

	This prevents early collection of the array.  The GC doesn't see the
	array on the stack when Ruby is compiled with optimizations enabled

	Thanks @jhaberman for the test case

	[ruby-core:105099] [Bug #18140]
	---
	 ext/-test-/array/concat/depend          | 321 ++++++++++++++++++++++++++++++++
	 ext/-test-/array/concat/extconf.rb      |   2 +
	 ext/-test-/array/concat/to_ary_conact.c |  64 +++++++
	 test/-ext-/array/test_to_ary_concat.rb  |  20 ++
	 4 files changed, 407 insertions(+)
	 create mode 100644 ext/-test-/array/concat/depend
	 create mode 100644 ext/-test-/array/concat/extconf.rb
	 create mode 100644 ext/-test-/array/concat/to_ary_conact.c
	 create mode 100644 test/-ext-/array/test_to_ary_concat.rb

	Refined test [Bug #18140]

	---
	 ext/-test-/array/concat/to_ary_conact.c | 48 +++++++--------------------------
	 test/ruby/test_array.rb                 |  5 +++-
	 2 files changed, 13 insertions(+), 40 deletions(-)
2021-09-05 12:19:53 +09:00
nobu
dd3851d278 Rename test classes to allow stable test count when running test-all -j
[Fix GH-1763]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-13 06:29:02 +00:00
naruse
3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
nobu
5631792727 * ext/-test-/array/resize/resize.c (Init_resize): renamed method
for test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05 20:47:01 +00:00
nobu
c8aaf31fdd * array.c (rb_ary_resize): new utility function. [ruby-dev:42912]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05 20:10:59 +00:00