aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/stdlib/doc/src/gen_statem.xml2
-rw-r--r--lib/stdlib/src/gen_statem.erl9
-rw-r--r--lib/stdlib/test/gen_statem_SUITE.erl2
3 files changed, 4 insertions, 9 deletions
diff --git a/lib/stdlib/doc/src/gen_statem.xml b/lib/stdlib/doc/src/gen_statem.xml
index da88bedf6b..35b842c173 100644
--- a/lib/stdlib/doc/src/gen_statem.xml
+++ b/lib/stdlib/doc/src/gen_statem.xml
@@ -61,7 +61,7 @@ gen_statem module Callback module
gen_statem:start
gen_statem:start_link -----> Module:init/1
-gen_statem:stop -----> Module:terminate/2
+gen_statem:stop -----> Module:terminate/3
gen_statem:call
gen_statem:cast
diff --git a/lib/stdlib/src/gen_statem.erl b/lib/stdlib/src/gen_statem.erl
index dd980daddb..e6ad7ab0be 100644
--- a/lib/stdlib/src/gen_statem.erl
+++ b/lib/stdlib/src/gen_statem.erl
@@ -156,11 +156,10 @@
Actions :: [action()] | action()} |
{'keep_state', % {keep_state,NewData,[]}
NewData :: data()} |
- {'keep_state',
+ {'keep_state', % Keep state, change data
NewData :: data(),
Actions :: [action()] | action()} |
- {'keep_state_and_data'} | % {keep_state_and_data,[]}
- {'keep_state_and_data',
+ {'keep_state_and_data', % Keep state and data -> only actions
Actions :: [action()] | action()}.
@@ -880,10 +879,6 @@ loop_event_result(
loop_event_actions(
Parent, Debug, S, Events, Event,
State, State, NewData, Actions);
- {keep_state_and_data} ->
- loop_event_actions(
- Parent, Debug, S, Events, Event,
- State, State, Data, []);
{keep_state_and_data,Actions} ->
loop_event_actions(
Parent, Debug, S, Events, Event,
diff --git a/lib/stdlib/test/gen_statem_SUITE.erl b/lib/stdlib/test/gen_statem_SUITE.erl
index 27b042c0d8..f5cbdd9a40 100644
--- a/lib/stdlib/test/gen_statem_SUITE.erl
+++ b/lib/stdlib/test/gen_statem_SUITE.erl
@@ -1233,7 +1233,7 @@ wfor_conf(Type, Content, Data) ->
{next_state,idle,Data,
[{reply,From,'eh?'}]};
_ ->
- throw({keep_state_and_data})
+ throw({keep_state_and_data,[]})
end;
Result ->
Result