ruby - Why was Pathname's chdir method obsoleted? -
why pathname's chdir
method obsoleted since ruby 1.8.1? wrong it?
this:
dir = pathname('a') dir.chdir ... end
is shorter , more readable this:
dir = pathname('a') dir.chdir(dir) ... end
nothing wrong it, pathname
wasn't right place it.
use dir.chdir
instead.
source: http://corelib.rubyonrails.org/classes/pathname.html#m000633 (click "[source]")
Comments
Post a Comment