diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-22 08:09:58 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-22 08:09:58 +0000 |
commit | ce9aba02a65a2a34f9c682635a4ccb5c3077b862 (patch) | |
tree | fa6ca2b3d705a9ea9ea67442b20c2e432dc647d6 /gc.c | |
parent | b2da7a3f81a5aacb3a2c725aad2b7397ea721cd5 (diff) | |
download | ruby-ce9aba02a65a2a34f9c682635a4ccb5c3077b862.tar.gz ruby-ce9aba02a65a2a34f9c682635a4ccb5c3077b862.tar.xz ruby-ce9aba02a65a2a34f9c682635a4ccb5c3077b862.zip |
* enum.c (inject_i): use rb_yield_values.
* enum.c (each_with_index_i): ditto.
* eval.c (rb_yield_splat): new function to call "yield *values".
* string.c (rb_str_scan): use rb_yield_splat().
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1636,10 +1636,10 @@ id2ref(obj, id) } ptr = id ^ FIXNUM_FLAG; /* unset FIXNUM_FLAG */ - if (!is_pointer_to_heap((void *)ptr)) { + if (!is_pointer_to_heap((void *)ptr)|| BUILTIN_TYPE(ptr) >= T_BLKTAG) { rb_raise(rb_eRangeError, "0x%lx is not id value", p0); } - if (RBASIC(ptr)->klass == 0) { + if (BUILTIN_TYPE(ptr) == 0 || RBASIC(ptr)->klass == 0) { rb_raise(rb_eRangeError, "0x%lx is recycled object", p0); } return (VALUE)ptr; |