1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test
shirosaki 1cdeab5cdd Fix WeakRef finalize
* array.c (rb_ary_delete_same_obj): new function for WeakRef.
  This deletes same objects as item argument in the array.

* internal.h (rb_ary_delete_same_obj): add a declaration.

* gc.c (wmap_final_func): remove WeakRef object reference from the
  array. rb_ary_delete() is not usable because it uses rb_equal() to
  compare object references.

* gc.c (wmap_finalize): remove recycled object references from weak
  map hash properly. How to get object reference from object id was
  wrong. st_delete() doesn't work properly if key and value arguments
  are same. The key of obj2wmap is referenced object and the value of
  obj2wmap is WeakRef array.

* gc.c (wmap_aset): obj2wmap should contain WeakRef array in the
  definition.

* test/test_weakref.rb
  (TestWeakRef#test_not_reference_different_object,
   TestWeakRef#test_weakref_finalize): add tests for above.
  [ruby-core:49044] [Bug #7304]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-24 12:26:54 +00:00
..
-ext- st_update passes the key in st_table 2012-11-17 02:46:13 +00:00
base64 * ruby.c (load_file_internal): set default source encoding as 2012-11-06 00:49:57 +00:00
benchmark
bigdecimal
cgi * test/cgi/test_cgi_core.rb: Add test for CGI#header. 2012-11-08 06:56:17 +00:00
coverage
csv
date * test/date/test_date_{parse,strptime}.rb: changed the format of 2012-11-11 10:02:32 +00:00
dbm
digest
dl * ruby.c (load_file_internal): set default source encoding as 2012-11-06 00:49:57 +00:00
drb
dtrace Define dtrace test classes only when dtrace exists 2012-11-13 08:52:34 +00:00
erb erb.rb: safe concurrent use 2012-11-09 14:33:11 +00:00
etc
fiddle
fileutils
gdbm
io io/wait: add IO#wait_writable method 2012-11-21 13:40:00 +00:00
irb
json
logger * ruby.c (load_file_internal): set default source encoding as 2012-11-06 00:49:57 +00:00
matrix
minitest
misc
mkmf
monitor
net * lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line): 2012-11-08 10:04:24 +00:00
nkf
objspace
open-uri
openssl * ruby.c (load_file_internal): set default source encoding as 2012-11-06 00:49:57 +00:00
optparse
ostruct
pathname
psych * ext/psych/lib/psych/visitors/yaml_tree.rb: use literal YAML style 2012-11-17 03:15:54 +00:00
rake remove trailing spaces 2012-11-16 06:41:05 +00:00
rdoc
readline
resolv
rexml
rinda
ripper * ruby.c (load_file_internal): set default source encoding as 2012-11-06 00:49:57 +00:00
rss
ruby * test/ruby/test_rubyoptions.rb (test_usage, test_usage_long): 2012-11-24 10:31:10 +00:00
rubygems
scanf
sdbm
socket
stringio
strscan
syslog * ruby.c (load_file_internal): set default source encoding as 2012-11-06 00:49:57 +00:00
testunit
thread
uri
webrick * ruby.c (load_file_internal): set default source encoding as 2012-11-06 00:49:57 +00:00
win32ole * test/win32ole/test_win32ole_type.rb (test_implemented_ole_types): 2012-11-20 12:34:21 +00:00
xmlrpc
zlib
inlinetest.rb
profile_test_all.rb
runner.rb
test_cmath.rb
test_curses.rb
test_delegate.rb
test_find.rb
test_ipaddr.rb
test_mathn.rb
test_mutex_m.rb
test_open3.rb
test_pp.rb
test_prettyprint.rb
test_prime.rb
test_pstore.rb
test_pty.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_weakref.rb Fix WeakRef finalize 2012-11-24 12:26:54 +00:00
with_different_ofs.rb