Skip to content

Commit dec7f68

Browse files
rrouseSergey Rublev
authored andcommitted
Ruby 1.9 doesn't like the Dir.chdir(@git_dir, &block) syntax.
(cherry picked from commit 4dcd82584c3097ba68a9507833e9f171d33407e0) Signed-off-by: Sergey Rublev <narma.nsk@gmail.com>
1 parent 94f389b commit dec7f68

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/git/lib.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ def config_get(name)
326326
end
327327

328328
if @git_dir
329-
Dir.chdir(@git_dir, &do_get)
329+
Dir.chdir(@git_dir) do
330+
do_get.call
331+
end
330332
else
331333
build_list.call
332334
end
@@ -342,7 +344,9 @@ def config_list
342344
end
343345

344346
if @git_dir
345-
Dir.chdir(@git_dir, &build_list)
347+
Dir.chdir(@git_dir) do
348+
build_list.call
349+
end
346350
else
347351
build_list.call
348352
end

0 commit comments

Comments
 (0)