# Rb\_ary2cary in dl.c has a bug

**URL:** <https://www.ruby-forum.com/t/rb-ary2cary-in-dl-c-has-a-bug/88677>\
**Category:** Development\
**Created:** [March 13, 2007, 2:04pm UTC](https://www.ruby-forum.com/t/rb-ary2cary-in-dl-c-has-a-bug/88677 "2007-03-13T14:04:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sheepman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Post date:** [March 13, 2007, 2:04pm UTC](https://www.ruby-forum.com/t/rb-ary2cary-in-dl-c-has-a-bug/88677/1 "2007-03-13T14:04:09Z")

</div>

e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B

ext/dl/dl.c e$B$K%P%0$,$"$j$^$9!#e(B

# $ svn diff dl.c Index: dl.c

— dl.c (revision 12047)  
+++ dl.c (working copy)  
@@ -459,7 +459,7 @@  
VALUE val0;

val0 = rb\_check\_array\_type(v);

- if(NIL\_P(TYPE(val0))) {

- if(NIL\_P(val0)) {  
rb\_raise(rb\_eDLTypeError, “an array is expected.”);  
}  
v = val0;

e$B$=$l$G$O!#e(B

---

<div class="post-metadata">

**Author:** ![sheepman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Post date:** [March 16, 2007, 1:54pm UTC](https://www.ruby-forum.com/t/rb-ary2cary-in-dl-c-has-a-bug/88677/2 "2007-03-16T13:54:14Z")

</div>

At Tue, 13 Mar 2007 22:03:18 +0900,  
sheepman wrote:

> VALUE val0;
> 
> val0 = rb\_check\_array\_type(v);
> 
> - if(NIL\_P(TYPE(val0))) {
> 
> - if(NIL\_P(val0)) {  
> rb\_raise(rb\_eDLTypeError, “an array is expected.”);  
> }  
> v = val0;

ã€€ruby\_1\_8 ã«å…¥ã‚Œã¾ã—ãŸã€‚

åœéƒ¨ã•ã‚“:  
ã€€ruby\_1\_8\_? ã«ã‚‚ãŠé¡˜ã„ã—ã¾ã™ã€‚

–  
/  
/\_\_ \_\_ [Akinori.org](http://Akinori.org) / [MUSHA.org](http://MUSHA.org)  
/ ) ) ) ) / [FreeBSD.org](http://FreeBSD.org) / [Ruby-lang.org](http://Ruby-lang.org)  
Akinori MUSHA aka / (\_ / ( (\_\_( @ [iDaemons.org](http://iDaemons.org) / and.or.jp

“Different eyes see different things,  
Different hearts beat on different strings –  
But there are times for you and me when all such things agree”
