Sha256: 38a99faff6ea1a262972aeff846c9b3e8f5b68bbe03ae22ad71eafc73fb2e05a

Contents?: true

Size: 279 Bytes

Versions: 15

Compression:

Stored size: 279 Bytes

Contents

module Polyfill
  module V2_3
    module Kernel
      def loop
        return super unless block_given?

        super do
          begin
            yield
          rescue StopIteration => enum
            break enum.result
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
polyfill-1.9.0 lib/polyfill/v2_3/kernel.rb
polyfill-1.8.0 lib/polyfill/v2_3/kernel.rb
polyfill-1.7.0 lib/polyfill/v2_3/kernel.rb
polyfill-1.6.0 lib/polyfill/v2_3/kernel.rb
polyfill-1.5.0 lib/polyfill/v2_3/kernel.rb
polyfill-1.4.0 lib/polyfill/v2_3/kernel.rb
polyfill-1.3.0 lib/polyfill/v2_3/kernel.rb
polyfill-1.2.0 lib/polyfill/v2_3/kernel.rb
polyfill-1.1.0 lib/polyfill/v2_3/kernel.rb
polyfill-1.0.1 lib/polyfill/v2_3/kernel.rb
polyfill-1.0.0 lib/polyfill/v2_3/kernel.rb
polyfill-0.10.0 lib/polyfill/v2_3/kernel.rb
polyfill-0.9.0 lib/polyfill/v2_3/kernel.rb
polyfill-0.8.0 lib/polyfill/v2_3/kernel.rb
polyfill-0.7.0 lib/polyfill/v2_3/kernel.rb