Sha256: e0c4bf69365c9a5f778d610da3d746368ab8831d6f758c0739628ccebcb9f6a9

Contents?: true

Size: 436 Bytes

Versions: 1

Compression:

Stored size: 436 Bytes

Contents

module Polyfill
  module V2_4
    module MatchData
      module NamedCaptures
        module Method
          def named_captures
            names.each_with_object({}) do |name, acc|
              acc[name] = self[name]
            end
          end if RUBY_VERSION < '2.4.0'
        end

        if RUBY_VERSION < '2.4.0'
          refine ::MatchData do
            include Method
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
polyfill-0.2.0 lib/polyfill/v2_4/match_data/named_captures.rb