diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-11-08 06:43:14 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-11-08 06:43:14 +0000 |
commit | dc98adf839d0d68c4c18647a1db2fb3dc9be8cc4 (patch) | |
tree | 7f6e3c4b45359409bf57526308837f5dbbc45905 /lib/weakref.rb | |
parent | ab827130d3f563535abb7404230f5b5e63bf0946 (diff) | |
download | ruby-dc98adf839d0d68c4c18647a1db2fb3dc9be8cc4.tar.gz |
* process.c (security): always give warning for insecure PATH.
* dir.c (my_getcwd): do not rely on MAXPATHLEN.
* file.c (rb_file_s_readlink): ditto.
* file.c (path_check_1): ditto.
* eval.c (rb_yield_0): should not call rb_f_block_given_p().
* string.c (rb_str_chomp_bang): should terminate string by NUL.
* eval.c (rb_yield_0): better error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/weakref.rb')
-rw-r--r-- | lib/weakref.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/weakref.rb b/lib/weakref.rb index 459f69f924..6861fde5f5 100644 --- a/lib/weakref.rb +++ b/lib/weakref.rb @@ -60,7 +60,11 @@ class WeakRef<Delegator unless ID_MAP[@__id] raise RefError, "Illegal Reference - probably recycled", caller(2) end - ObjectSpace._id2ref(@__id) + begin + ObjectSpace._id2ref(@__id) + rescue RangeError + raise RefError, "Illegal Reference - probably recycled", caller(2) + end end def weakref_alive? |