Sha256: ac51f3c99038ea49ad4a22681bd3c2734f078d067ae60cf88d51e41d45e12139

Contents?: true

Size: 254 Bytes

Versions: 9

Compression:

Stored size: 254 Bytes

Contents

module Polyfill
  module V2_5
    module Kernel
      def yield_self
        unless block_given?
          return ::Enumerator.new(1) do |yielder|
            yielder.yield(self)
          end
        end

        yield(self)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
polyfill-1.9.0 lib/polyfill/v2_5/kernel.rb
polyfill-1.8.0 lib/polyfill/v2_5/kernel.rb
polyfill-1.7.0 lib/polyfill/v2_5/kernel.rb
polyfill-1.6.0 lib/polyfill/v2_5/kernel.rb
polyfill-1.5.0 lib/polyfill/v2_5/kernel.rb
polyfill-1.4.0 lib/polyfill/v2_5/kernel.rb
polyfill-1.3.0 lib/polyfill/v2_5/kernel.rb
polyfill-1.2.0 lib/polyfill/v2_5/kernel.rb
polyfill-1.1.0 lib/polyfill/v2_5/kernel.rb