Created
February 13, 2012 16:39
-
-
Save tmacedo/1818057 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VALUE | |
rb_ary_each(VALUE array) | |
{ | |
long i; | |
volatile VALUE ary = array; | |
RETURN_ENUMERATOR(ary, 0, 0); | |
for (i=0; i<RARRAY_LEN(ary); i++) { | |
rb_yield(RARRAY_PTR(ary)[i]); | |
} | |
return ary; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment