Sha256: 4e6fa77dbecb5a792865751689b34a88a353d61056f49dab7381eb30855f8e56
Contents?: true
Size: 476 Bytes
Versions: 26
Compression:
Stored size: 476 Bytes
Contents
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
Version data entries
26 entries across 26 versions & 1 rubygems