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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -