/ Published in: Ruby
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
class Array
def shuffle
sort_by { rand }
end
def shuffle!
self.replace shuffle
end
end
Comments
 Subscribe to comments
                    Subscribe to comments
                
                