Guest User

Untitled

a guest
Jan 22nd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. static VALUE
  2. partition_i(VALUE i, VALUE *ary, int argc, VALUE *argv)
  3. {
  4. ENUM_WANT_SVALUE();
  5.  
  6. if (RTEST(rb_yield(i))) {
  7. rb_ary_push(ary[0], i);
  8. }
  9. else {
  10. rb_ary_push(ary[1], i);
  11. }
  12. return Qnil;
  13. }
Add Comment
Please, Sign In to add comment