From 7aa75291524569cce1baa67bdef7a194cb3f9adc Mon Sep 17 00:00:00 2001 From: Mike Nolta Date: Tue, 18 Nov 2014 20:07:21 -0500 Subject: [PATCH] remove extra args from do-block cd() method --- base/file.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base/file.jl b/base/file.jl index ed162486806e8..8302403322947 100644 --- a/base/file.jl +++ b/base/file.jl @@ -12,22 +12,22 @@ function cd(dir::AbstractString) end cd() = cd(homedir()) -@unix_only function cd(f::Function, dir::AbstractString, args...) +@unix_only function cd(f::Function, dir::AbstractString) fd = ccall(:open,Int32,(Ptr{UInt8},Int32),".",0) systemerror(:open, fd == -1) try cd(dir) - f(args...) + f() finally systemerror(:fchdir, ccall(:fchdir,Int32,(Int32,),fd) != 0) systemerror(:close, ccall(:close,Int32,(Int32,),fd) != 0) end end -@windows_only function cd(f::Function, dir::AbstractString, args...) +@windows_only function cd(f::Function, dir::AbstractString) old = pwd() try cd(dir) - f(args...) + f() finally cd(old) end