Sha256: caaf9989eefd38a58045748c77ea1ad8a54ff65d7f60e94d5f41ecf3f871c110
Contents?: true
Size: 305 Bytes
Versions: 35
Compression:
Stored size: 305 Bytes
Contents
class Array def select! where_at = 0 total = length each{|member| if yield(member) self[where_at] = member where_at += 1 end } while(where_at < total) self[where_at] = nil where_at += 1 end compact! # there may be a better way... self end end
Version data entries
35 entries across 35 versions & 1 rubygems