ruby - Is there a particular function to retrieve then delete random array element? -


i know can in couple of steps, wondering if there function can achieve this.

i want array#sample, remove element retrieved.

how this:

array.delete_at(rand(array.length)) 

Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -