diff options
author | Fredrik Gustafsson <[email protected]> | 2013-09-11 12:17:06 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-09-11 12:17:06 +0200 |
commit | e04d25d707d77453f7acd0c098d46a24b828830b (patch) | |
tree | 2e0cd437356d884420606db5ce8b22e98542a852 /erts/preloaded | |
parent | f13bf23b904fc155e41da4d00a2a8387ef27b1fd (diff) | |
parent | bb73eb3cbf6d7754389ffbe7e0bfe91fab865888 (diff) | |
download | otp-e04d25d707d77453f7acd0c098d46a24b828830b.tar.gz otp-e04d25d707d77453f7acd0c098d46a24b828830b.tar.bz2 otp-e04d25d707d77453f7acd0c098d46a24b828830b.zip |
Merge branch 'maint'
Conflicts:
erts/preloaded/ebin/erlang.beam
Diffstat (limited to 'erts/preloaded')
-rw-r--r-- | erts/preloaded/ebin/erlang.beam | bin | 94140 -> 94192 bytes | |||
-rw-r--r-- | erts/preloaded/src/erlang.erl | 15 |
2 files changed, 8 insertions, 7 deletions
diff --git a/erts/preloaded/ebin/erlang.beam b/erts/preloaded/ebin/erlang.beam Binary files differindex db41a9d2e1..cadaf8b612 100644 --- a/erts/preloaded/ebin/erlang.beam +++ b/erts/preloaded/ebin/erlang.beam 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! |