Module: Skylight::Util::AllocationFree Private
- Included in:
- Normalizers::RenderNormalizer
- Defined in:
- lib/skylight/util/allocation_free.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #array_find(array) ⇒ Object private
Instance Method Details
#array_find(array) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/skylight/util/allocation_free.rb', line 4 def array_find(array) i = 0 while i < array.size item = array[i] return item if yield item i += 1 end nil end |