p = Pathname.new(“C:\ruby\samples\myFile”)
dir = p.dirname
base = p.basename
I just like to use “myFile”,but p.basename seems not work on Windows
How to solve this kind of problem?
any help or suggest would be greatly appreciated much.
Thanks a lot.