Sha256: 48c28b5411c10cbbd4de155231b684c2ec146611857855f207acae19a0cded5d

Contents?: true

Size: 512 Bytes

Versions: 2

Compression:

Stored size: 512 Bytes

Contents

module Polyfill
  module V2_4
    module Symbol
      module Instance
        module Match
          module Method
            def match(*args)
              if block_given?
                to_s.match(*args, &Proc.new)
              else
                to_s.match(*args)
              end
            end
          end

          refine ::Symbol do
            include Method
          end

          def self.included(base)
            base.include Method
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
polyfill-0.5.0 lib/polyfill/v2_4/symbol/instance/match.rb
polyfill-0.4.0 lib/polyfill/v2_4/symbol/instance/match.rb