aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-09-11 12:17:06 +0200
committerFredrik Gustafsson <[email protected]>2013-09-11 12:17:06 +0200
commite04d25d707d77453f7acd0c098d46a24b828830b (patch)
tree2e0cd437356d884420606db5ce8b22e98542a852 /erts/preloaded/src
parentf13bf23b904fc155e41da4d00a2a8387ef27b1fd (diff)
parentbb73eb3cbf6d7754389ffbe7e0bfe91fab865888 (diff)
downloadotp-e04d25d707d77453f7acd0c098d46a24b828830b.tar.gz
otp-e04d25d707d77453f7acd0c098d46a24b828830b.tar.bz2
otp-e04d25d707d77453f7acd0c098d46a24b828830b.zip
Merge branch 'maint'
Conflicts: erts/preloaded/ebin/erlang.beam
Diffstat (limited to 'erts/preloaded/src')
-rw-r--r--erts/preloaded/src/erlang.erl15
1 files changed, 8 insertions, 7 deletions
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index 833f0440ea..f4f3918550 100644
--- a/erts/preloaded/src/erlang.erl
+++ b/erts/preloaded/src/erlang.erl
@@ -2891,22 +2891,23 @@ integer_to_binary(I, Base)
when erlang:is_integer(I), erlang:is_integer(Base),
Base >= 2, Base =< 1+$Z-$A+10 ->
if I < 0 ->
- <<"$-",(integer_to_binary(-I, Base, []))/binary>>;
+ <<$-,(integer_to_binary(-I, Base, <<>>))/binary>>;
true ->
integer_to_binary(I, Base, <<>>)
end;
integer_to_binary(I, Base) ->
erlang:error(badarg, [I, Base]).
-integer_to_binary(0, _Base, R0) ->
- R0;
integer_to_binary(I0, Base, R0) ->
D = I0 rem Base,
I1 = I0 div Base,
- if D >= 10 ->
- integer_to_binary(I1,Base,<<(D-10+$A),R0/binary>>);
- true ->
- integer_to_binary(I1,Base,<<(D+$0),R0/binary>>)
+ R1 = if
+ D >= 10 -> <<(D-10+$A),R0/binary>>;
+ true -> <<(D+$0),R0/binary>>
+ end,
+ if
+ I1 =:= 0 -> R1;
+ true -> integer_to_binary(I1, Base, R1)
end.
%% erlang:flush_monitor_message/2 is for internal use only!