require 'nano/kernel/op_esc' module Kernel # Require a file with puncuation marks escaped using NANOESC table. # # require_esc '[].rb' # # in actuality requires the file 'op_fetch.rb'. private def require_esc( fpath ) fdir, fname = File.split(fpath) ename = op_esc( fname ) case ename[-1,1] ; when '!','=','?' then ename = ename[0...-1] ; end epath = File.join( fdir, ename ) require( epath ) end end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TCKernel < Test::Unit::TestCase def test_require_esc assert_nothing_raised { require_esc 'facet/string/blank' } assert( "".respond_to?( :blank? ) ) end end =end