erlang-rebar/rebar-0006-Remove-any-traces-of-long-time-obsolete-escript-fold.patch

25 lines
828 B
Diff
Raw Normal View History

From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sat, 2 Mar 2013 13:35:36 +0400
Subject: [PATCH] Remove any traces of long-time obsolete escript:foldl/3
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index 64595a2..08f5b5f 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -222,12 +222,7 @@ abort(String, Args) ->
%% undocumented exported fun and has been removed in R14.
escript_foldl(Fun, Acc, File) ->
{module, zip} = code:ensure_loaded(zip),
- case erlang:function_exported(zip, foldl, 3) of
- true ->
- emulate_escript_foldl(Fun, Acc, File);
- false ->
- escript:foldl(Fun, Acc, File)
- end.
+ emulate_escript_foldl(Fun, Acc, File).
find_executable(Name) ->
case os:find_executable(Name) of