lib/aruba/api/core.rb in aruba-1.0.3 vs lib/aruba/api/core.rb in aruba-1.0.4
- old
+ new
@@ -55,10 +55,10 @@
#
# @example Run code in directory
# result = cd('some-dir') { Dir.getwd }
#
def cd(dir, &block)
- if block_given?
+ if block
begin
unless Aruba.platform.directory?(expand_path(dir))
raise ArgumentError,
"#{expand_path(dir)} is not a directory or does not exist."
end