Skip to content

Commit e896e31

Browse files
author
José Valim
committed
Merge pull request #833 from kimshrier/process_self_deprecations
Change references or invocations of Process.self to Kernel.self
2 parents 5fe1544 + ced13c1 commit e896e31

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/elixir/lib/kernel.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ defmodule Kernel do
6969
7070
## Examples
7171
72-
process = Process.self
72+
process = Kernel.self
7373
process <- { :ok, "Sending myself a message" }
7474
7575
"""
@@ -1023,8 +1023,8 @@ defmodule Kernel do
10231023
10241024
## Examples
10251025
1026-
current = Process.self
1027-
child = spawn(fn -> current <- { Process.self, 1 + 2 } end)
1026+
current = Kernel.self
1027+
child = spawn(fn -> current <- { Kernel.self, 1 + 2 } end)
10281028
10291029
receive
10301030
{ ^child, 3 } -> IO.puts "Received 3 back"
@@ -1061,8 +1061,8 @@ defmodule Kernel do
10611061
10621062
## Examples
10631063
1064-
current = Process.self
1065-
child = spawn_link(fn -> current <- { Process.self, 1 + 2 } end)
1064+
current = Kernel.self
1065+
child = spawn_link(fn -> current <- { Kernel.self, 1 + 2 } end)
10661066
10671067
receive
10681068
{ ^child, 3 } ->

lib/elixir/test/elixir/protocol_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ defmodule ProtocolTest do
116116
assert_protocol_for(ProtocolTest.WithAll, Tuple, {Bar,2,3})
117117
assert_protocol_for(ProtocolTest.WithAll, BitString, "foo")
118118
assert_protocol_for(ProtocolTest.WithAll, BitString, <<1>>)
119-
assert_protocol_for(ProtocolTest.WithAll, PID, Process.self)
119+
assert_protocol_for(ProtocolTest.WithAll, PID, Kernel.self)
120120
assert_protocol_for(ProtocolTest.WithAll, Port, hd(:erlang.ports))
121121
assert_protocol_for(ProtocolTest.WithAll, Reference, make_ref)
122122
end

0 commit comments

Comments
 (0)