diff options
author | Anthony Ramine <[email protected]> | 2012-11-12 10:02:58 +0100 |
---|---|---|
committer | Anthony Ramine <[email protected]> | 2013-12-12 12:46:31 +0100 |
commit | ad882c4ae17d23fd0ce0affbf2cccefc264de6a9 (patch) | |
tree | fe141b9f249c3eae2c76c3fc5f7f931cc45b57c9 /lib/stdlib/src/ets.erl | |
parent | 8261c96c35d0691dc2619456a29ee41c1b944b1c (diff) | |
download | otp-ad882c4ae17d23fd0ce0affbf2cccefc264de6a9.tar.gz otp-ad882c4ae17d23fd0ce0affbf2cccefc264de6a9.tar.bz2 otp-ad882c4ae17d23fd0ce0affbf2cccefc264de6a9.zip |
Support named funs in the shell
The current code for the evaluation of ordinary funs is dependent
on the order on variables in the fun environment as returned by
erlang:fun_info(Fun, env).
To avoid the problem in the future, make sure that we only have one
free variable in the funs that we will need to inspect using
erlang:fun_info(Fun, env).
Diffstat (limited to 'lib/stdlib/src/ets.erl')
-rw-r--r-- | lib/stdlib/src/ets.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/stdlib/src/ets.erl b/lib/stdlib/src/ets.erl index f05bfd12a7..cc5e69f574 100644 --- a/lib/stdlib/src/ets.erl +++ b/lib/stdlib/src/ets.erl @@ -507,7 +507,7 @@ fun2ms(ShellFun) when is_function(ShellFun) -> Else -> Else end; - false -> + _ -> exit({badarg,{?MODULE,fun2ms, [function,called,with,real,'fun', should,be,transformed,with, |