Browse Source

Use fn/1,2 instead of fn/{1,2} everywhere

Loïc Hoguin 7 years ago
parent
commit
7e111201f6
3 changed files with 7 additions and 7 deletions
  1. 1 1
      doc/src/guide/parsers.asciidoc
  2. 3 3
      doc/src/guide/protocols.asciidoc
  3. 3 3
      test/acceptor_SUITE.erl

+ 1 - 1
doc/src/guide/parsers.asciidoc

@@ -21,7 +21,7 @@ will only cover the first two.
 Text protocols are generally line based. This means that we can't
 Text protocols are generally line based. This means that we can't
 do anything with them until we receive the full line.
 do anything with them until we receive the full line.
 
 
-A simple way to get a full line is to use `binary:split/{2,3}`.
+A simple way to get a full line is to use `binary:split/2,3`.
 
 
 .Using binary:split/2 to get a line of input
 .Using binary:split/2 to get a line of input
 
 

+ 3 - 3
doc/src/guide/protocols.asciidoc

@@ -14,7 +14,7 @@ the call to `ranch:start_listener/5`. This callback must
 return `{ok, Pid}`, with `Pid` the pid of the new process.
 return `{ok, Pid}`, with `Pid` the pid of the new process.
 
 
 The newly started process can then freely initialize itself. However,
 The newly started process can then freely initialize itself. However,
-it must call `ranch:handshake/{1,2}` before doing any socket operation.
+it must call `ranch:handshake/1,2` before doing any socket operation.
 This will ensure the connection process is the owner of the socket.
 This will ensure the connection process is the owner of the socket.
 It expects the listener's name as argument.
 It expects the listener's name as argument.
 
 
@@ -25,7 +25,7 @@ It expects the listener's name as argument.
 
 
 If your protocol code requires specific socket options, you should
 If your protocol code requires specific socket options, you should
 set them while initializing your connection process, after
 set them while initializing your connection process, after
-calling `ranch:handshake/{1,2}`. You can use `Transport:setopts/2`
+calling `ranch:handshake/1,2`. You can use `Transport:setopts/2`
 for that purpose.
 for that purpose.
 
 
 Following is the complete protocol code for the example found
 Following is the complete protocol code for the example found
@@ -64,7 +64,7 @@ loop(Socket, Transport) ->
 Special processes like the ones that use the `gen_statem` or `gen_server`
 Special processes like the ones that use the `gen_statem` or `gen_server`
 behaviours have the particularity of having their `start_link` call not
 behaviours have the particularity of having their `start_link` call not
 return until the `init` function returns. This is problematic, because
 return until the `init` function returns. This is problematic, because
-you won't be able to call `ranch:handshake/{1,2}` from the `init` callback
+you won't be able to call `ranch:handshake/1,2` from the `init` callback
 as this would cause a deadlock to happen.
 as this would cause a deadlock to happen.
 
 
 Use the `gen_statem:enter_loop/4` function. It allows you to start your process
 Use the `gen_statem:enter_loop/4` function. It allows you to start your process

+ 3 - 3
test/acceptor_SUITE.erl

@@ -582,11 +582,11 @@ ssl_getstat_capability(_) ->
 		{ok, Vsn} when Vsn>="8.0" ->
 		{ok, Vsn} when Vsn>="8.0" ->
 			do_ssl_getstat_capability();
 			do_ssl_getstat_capability();
 		_ ->
 		_ ->
-			{skip, "No getstat/{1,2} support."}
+			{skip, "No getstat/1,2 support."}
 	end.
 	end.
 
 
 do_ssl_getstat_capability() ->
 do_ssl_getstat_capability() ->
-	doc("Ensure getstat/{1,2} capability."),
+	doc("Ensure getstat/1,2 capability."),
 	Name=name(),
 	Name=name(),
 	Opts=ct_helper:get_certs_from_ets(),
 	Opts=ct_helper:get_certs_from_ets(),
 	{ok, _} = ranch:start_listener(Name,
 	{ok, _} = ranch:start_listener(Name,
@@ -896,7 +896,7 @@ tcp_getopts_capability(_) ->
 	ok.
 	ok.
 
 
 tcp_getstat_capability(_) ->
 tcp_getstat_capability(_) ->
-	doc("Ensure getstat/{1,2} capability."),
+	doc("Ensure getstat/1,2 capability."),
 	Name=name(),
 	Name=name(),
 	{ok, _}=ranch:start_listener(Name,
 	{ok, _}=ranch:start_listener(Name,
 		ranch_tcp, #{},
 		ranch_tcp, #{},