Sha256: b9d8077d452ab9baf022e1f433a1205ffe4e55cba762c0a751886f6a762cbcd1
Contents?: true
Size: 242 Bytes
Versions: 10
Compression:
Stored size: 242 Bytes
Contents
module Kernel # Repeat loop until it yeilds false or nil. # # a = [3, 2, 1] # complete do # b << a.pop # end # b #=> [3, 2, 1, nil] # # CREDIT: Trans def complete loop { break unless yield } end end
Version data entries
10 entries across 10 versions & 1 rubygems