Guest User

Untitled

a guest
Jan 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. static VALUE
  2. enum_partition(VALUE obj)
  3. {
  4. VALUE ary[2];
  5.  
  6. RETURN_ENUMERATOR(obj, 0, 0);
  7.  
  8. ary[0] = rb_ary_new();
  9. ary[1] = rb_ary_new();
  10. rb_block_call(obj, id_each, 0, 0, partition_i, (VALUE)ary);
  11.  
  12. return rb_assoc_new(ary[0], ary[1]);
  13. }
Add Comment
Please, Sign In to add comment