mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
3eb3f7bb8c
instead of :TOTAL of ObjectSpace.count_objects. This test had failed very occasionally: https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos8/ruby-master/log/20200521T033004Z.fail.html.gz ``` 1) Failure: TestRubyOptimization#test_block_parameter_should_not_create_objects [/home/chkbuild/chkbuild/tmp/build/20200521T033004Z/ruby/test/ruby/test_optimization.rb:713]: <0> expected but was <407>. ``` This test of lazy proc creation checks if no object is created during a method call. However, calling a method itself increases the count of objects because method cache is now an object (T_MEMO). The reason why this test rarely fails is because the test was buggy; it checked the count of :TOTAL, but :TOTAL count changes only when the GC heap is expanded. Creating one object rarely causes heap expansion. The test must have checked not only :TOTAL but also the count of :FREE. Instead, this change more directly checks :T_DATA. Note that a Proc object is T_DATA. |
||
---|---|---|
.. | ||
-ext- | ||
base64 | ||
benchmark | ||
bigdecimal | ||
cgi | ||
coverage | ||
csv | ||
date | ||
dbm | ||
did_you_mean | ||
digest | ||
drb | ||
dtrace | ||
erb | ||
etc | ||
excludes | ||
fiber | ||
fiddle | ||
fileutils | ||
gdbm | ||
io | ||
irb | ||
json | ||
lib | ||
logger | ||
matrix | ||
mkmf | ||
monitor | ||
net | ||
nkf | ||
objspace | ||
open-uri | ||
openssl | ||
optparse | ||
ostruct | ||
pathname | ||
psych | ||
racc | ||
rdoc | ||
readline | ||
reline | ||
resolv | ||
rinda | ||
ripper | ||
ruby | ||
rubygems | ||
sdbm | ||
socket | ||
stringio | ||
strscan | ||
syslog | ||
uri | ||
webrick | ||
win32ole | ||
yaml | ||
zlib | ||
runner.rb | ||
test_abbrev.rb | ||
test_delegate.rb | ||
test_extlibs.rb | ||
test_find.rb | ||
test_forwardable.rb | ||
test_ipaddr.rb | ||
test_mutex_m.rb | ||
test_observer.rb | ||
test_open3.rb | ||
test_pp.rb | ||
test_prettyprint.rb | ||
test_prime.rb | ||
test_pstore.rb | ||
test_pty.rb | ||
test_rbconfig.rb | ||
test_securerandom.rb | ||
test_set.rb | ||
test_shellwords.rb | ||
test_singleton.rb | ||
test_syslog.rb | ||
test_tempfile.rb | ||
test_time.rb | ||
test_timeout.rb | ||
test_tmpdir.rb | ||
test_tracer.rb | ||
test_tsort.rb | ||
test_unicode_normalize.rb | ||
test_weakref.rb | ||
test_win32api.rb |