# File lib/vendor/fssm/ext.rb, line 15 def chop_basename(path) base = File.basename(path) # the original version of this method recalculates this regexp # each run, despite the pattern never changing. if CHOP_PAT =~ base return nil else return path[0, path.rindex(base)], base end end