Sha256: fbf83fd0c79e5ba51e366e977cfc19a840919e7d031eede7d347d54254f9851e
Contents?: true
Size: 243 Bytes
Versions: 7
Compression:
Stored size: 243 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
7 entries across 7 versions & 2 rubygems