lib/polyfill/v2_3/enumerator/lazy.rb in polyfill-0.6.0 vs lib/polyfill/v2_3/enumerator/lazy.rb in polyfill-0.7.0
- old
+ new
@@ -1,11 +1,15 @@
-require_relative 'lazy/instance'
-
module Polyfill
module V2_3
module Enumerator
module Lazy
- include Instance
+ def grep_v(pattern)
+ ::Enumerator::Lazy.new(self) do |yielder, element|
+ next if pattern === element # rubocop:disable Style/CaseEquality
+
+ yielder << (block_given? ? yield(element) : element)
+ end
+ end
end
end
end
end