diff options
author | Björn Gustavsson <[email protected]> | 2011-10-20 16:24:59 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-11-29 14:08:40 +0100 |
commit | e90602c2e3b0c1303b4c32aa35bac14ea36fe124 (patch) | |
tree | fe5b2a165da9070fad1968c5326cf4f7dbfe745c /lib/stdlib | |
parent | 74ef3c239828c5cf4305bfd4e0651eb4e57f3afb (diff) | |
download | otp-e90602c2e3b0c1303b4c32aa35bac14ea36fe124.tar.gz otp-e90602c2e3b0c1303b4c32aa35bac14ea36fe124.tar.bz2 otp-e90602c2e3b0c1303b4c32aa35bac14ea36fe124.zip |
shell: Eliminate use of tuple funs
Diffstat (limited to 'lib/stdlib')
-rw-r--r-- | lib/stdlib/src/shell.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/stdlib/src/shell.erl b/lib/stdlib/src/shell.erl index 964697cae6..dc450f0ee6 100644 --- a/lib/stdlib/src/shell.erl +++ b/lib/stdlib/src/shell.erl @@ -1065,9 +1065,10 @@ local_func(F, As0, Bs0, _Shell, _RT, Lf, Ef) when is_atom(F) -> non_builtin_local_func(F,As,Bs). non_builtin_local_func(F,As,Bs) -> - case erlang:function_exported(user_default, F, length(As)) of + Arity = length(As), + case erlang:function_exported(user_default, F, Arity) of true -> - {eval,{user_default,F},As,Bs}; + {eval,erlang:make_fun(user_default, F, Arity),As,Bs}; false -> shell_default(F,As,Bs) end. @@ -1079,7 +1080,7 @@ shell_default(F,As,Bs) -> {module, _} -> case erlang:function_exported(M,F,A) of true -> - {eval,{M,F},As,Bs}; + {eval,erlang:make_fun(M, F, A),As,Bs}; false -> shell_undef(F,A) end; |