Sha256: f1a4c1327ca3fa11fb184befde3da3314117bab307339f4afe5fad238cd4404e

Contents?: true

Size: 436 Bytes

Versions: 72

Compression:

Stored size: 436 Bytes

Contents

class Regexp
  # Standard in Ruby 1.8.7+. See official documentation[http://www.ruby-doc.org/core-1.8.7/classes/Regexp.html]
  class << self
    unless (union(%w(a b)) rescue false)
      def union_with_array_argument(*arg)
        return union_without_array_argument(*arg) unless arg.size == 1
        union_without_array_argument(*arg.first)
      end
      Backports.alias_method_chain self, :union, :array_argument
    end
  end
end

Version data entries

72 entries across 72 versions & 3 rubygems

Version Path
backports-1.11.1 lib/backports/1.8.7/regexp.rb
backports-1.11.0 lib/backports/1.8.7/regexp.rb
backports-1.10.3 lib/backports/1.8.7/regexp.rb
backports-1.10.2 lib/backports/1.8.7/regexp.rb
backports-1.10.1 lib/backports/1.8.7/regexp.rb
backports-1.10.0 lib/backports/1.8.7/regexp.rb
backports-1.8.4 lib/backports/1.8.7/regexp.rb
backports-1.9.0 lib/backports/1.8.7/regexp.rb
backports-1.8.3 lib/backports/1.8.7/regexp.rb
backports-1.8.1 lib/backports/1.8.7/regexp.rb
backports-1.8.2 lib/backports/1.8.7/regexp.rb
backports-1.8.0 lib/backports/1.8.7/regexp.rb