aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-04-21 14:50:43 +0200
committerLukas Larsson <[email protected]>2017-04-21 14:50:43 +0200
commiteece23d7f6b225a6abc3807f9af44d1f742f7eee (patch)
treec3dd3dec6754957cbe10440fb883a34d74002307 /erts
parent38fe97060d06246804b45494cacbed134b1c51fa (diff)
downloadotp-eece23d7f6b225a6abc3807f9af44d1f742f7eee.tar.gz
otp-eece23d7f6b225a6abc3807f9af44d1f742f7eee.tar.bz2
otp-eece23d7f6b225a6abc3807f9af44d1f742f7eee.zip
erts: Polish off erlang:list_to_ref/1
Diffstat (limited to 'erts')
-rw-r--r--erts/doc/src/erlang.xml18
-rw-r--r--erts/preloaded/src/erlang.erl2
2 files changed, 19 insertions, 1 deletions
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index cb2cdec606..a8836d3cbb 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -2499,6 +2499,24 @@ os_prompt%</pre>
</func>
<func>
+ <name name="list_to_ref" arity="1"/>
+ <fsummary>Convert from text representation to a ref.</fsummary>
+ <desc>
+ <p>Returns a reference whose text representation is a
+ <c><anno>String</anno></c>, for example:</p>
+ <pre>
+> <input>list_to_ref("#Ref&lt;0.4192537678.4073193475.71181>").</input>
+#Ref&lt;0.4192537678.4073193475.71181></pre>
+ <p>Failure: <c>badarg</c> if <c><anno>String</anno></c> contains a bad
+ representation of a reference.</p>
+ <warning>
+ <p>This BIF is intended for debugging and is not to be used
+ in application programs.</p>
+ </warning>
+ </desc>
+ </func>
+
+ <func>
<name name="list_to_tuple" arity="1"/>
<fsummary>Convert a list to a tuple.</fsummary>
<desc>
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index 888d2beee0..12b8afb53e 100644
--- a/erts/preloaded/src/erlang.erl
+++ b/erts/preloaded/src/erlang.erl
@@ -1161,7 +1161,7 @@ list_to_pid(_String) ->
erlang:nif_error(undefined).
%% list_to_ref/1
--spec erlang:list_to_ref(String) -> reference() when
+-spec list_to_ref(String) -> reference() when
String :: string().
list_to_ref(_String) ->
erlang:nif_error(undefined).