Sha256: 968157d3d3f741f552de3113a40dcd13e15669cb5be26d52fc82d191d72d67f3

Contents?: true

Size: 318 Bytes

Versions: 11

Compression:

Stored size: 318 Bytes

Contents

class Regexp
  # Standard in Ruby 1.8.8. See official documentation[http://ruby-doc.org/core-1.9/classes/Array.html]
  class << self
    def self.try_convert(obj)
      return nil unless obj.respond_to?(:to_regexp)
      Backports.coerce_to(obj, Array, :to_regexp)
    end unless method_defined? :try_convert
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
backports-1.15.0 lib/backports/1.8.8/regexp.rb
backports-1.14.1 lib/backports/1.8.8/regexp.rb
backports-1.14.0 lib/backports/1.8.8/regexp.rb
backports-1.13.3 lib/backports/1.8.8/regexp.rb
backports-1.13.2 lib/backports/1.8.8/regexp.rb
backports-1.13.1 lib/backports/1.8.8/regexp.rb
backports-1.13.0 lib/backports/1.8.8/regexp.rb
backports-1.12.3 lib/backports/1.8.8/regexp.rb
backports-1.12.2 lib/backports/1.8.8/regexp.rb
backports-1.12.1 lib/backports/1.8.8/regexp.rb
backports-1.12.0 lib/backports/1.8.8/regexp.rb