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

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -