
class Regexp

  # Like #to_re, but following Ruby's formal definitions,
  # only a Regular expression type object will respond to this.
  #
  # Note: To be of much real use this should be defined in core Ruby.
  def to_regexp
    self
  end

end



#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
=begin test

  require 'test/unit'

  class TCRegexp < Test::Unit::TestCase

    def test_to_regexp
      r = /0..10/
      assert_equal( r, r.to_regexp )
    end

  end

=end

