Sha256: 6784ae4a41df6cf4a31db8735d230d63eda4ff086bba822ea9fde554eda6659c
Contents?: true
Size: 445 Bytes
Versions: 7
Compression:
Stored size: 445 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ | # |_|\___||___/\__| # require 'facets/string/regesc.rb' require 'test/unit' class TestStringRegesc < Test::Unit::TestCase def test_regesc a = "?" b = /#{a.regesc}/ assert( b =~ "?" ) end def test_resc assert_equal( Regexp.escape("'jfiw0[]4"), resc("'jfiw0[]4") ) assert_equal( Regexp.escape("/////"), resc("/////") ) end end
Version data entries
7 entries across 7 versions & 1 rubygems