Skip to content

Commit 5fe1544

Browse files
author
José Valim
committed
Deprecate Process.self in favor of Kernel.self to make imports easier, closes #832
1 parent 96c7f68 commit 5fe1544

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* deprecations
1212
* [Kernel] Tidy up and clean `quote` API
1313
* [Kernel] Old `:local.(args)` syntax is deprecated
14+
* [Process] `Process.self` is deprecated in favor `Kernel.self`
1415

1516
# v0.8.0 (2013-01-28)
1617

lib/elixir/lib/node.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ defmodule Node do
8080
end
8181

8282
@doc """
83-
Establishes a connection to Node. Returns true if successful, false if not, and ignored if the local node is not alive.
83+
Establishes a connection to Node. Returns true if successful,
84+
false if not, and the atom `:ignored` if the local node is not
85+
alive.
86+
8487
See http://erlang.org/doc/man/net_kernel.html#connect_node-1 for more info.
8588
"""
8689
@spec connect(t) :: boolean | :ignored

lib/elixir/lib/process.ex

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ defmodule Process do
1919
:erlang.is_process_alive(pid)
2020
end
2121

22-
@doc """
23-
Returns the current process.
24-
"""
25-
@spec self :: pid
22+
@doc false
2623
def self do
24+
IO.puts "Process.self is deprecated, please use Kernel.self instead"
25+
Exception.print_stacktrace
2726
:erlang.self()
2827
end
2928

0 commit comments

Comments
 (0)