module Kernel # Provides a shortcut to the Regexp.escape module method. def resc(x) Regexp.escape(x) end end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TCKernel < Test::Unit::TestCase def test_resc assert_equal( Regexp.escape("'jfiw0[]4"), resc("'jfiw0[]4") ) assert_equal( Regexp.escape("/////"), resc("/////") ) end end =end