Sha256: 92a9ac0d4c630ac2a8bf13e434e83dd44aba83d0200f6a97d5a623a4de946c24
Contents?: true
Size: 166 Bytes
Versions: 6
Compression:
Stored size: 166 Bytes
Contents
module Enumerable def first!(&block) matching = find(&block) if matching.nil? raise "Sequence contains no matching elements" else matching end end end
Version data entries
6 entries across 6 versions & 1 rubygems