Commit Graph
8010 Commits
Author SHA1 Message Date
Tobiasz Małecki a3d7c1928e Added missing specs for Node get_cookie/0 and set_cookie/2 (#8719) 2019-01-26 17:22:04 +01:00
Fernando Tapia Rico 11eb44c3f8 Use default args in Calendar.ISO.*_to_string/* (#8707) 2019-01-26 09:21:34 +01:00
Fernando Tapia Rico 38969f180b Add missing @doc :since to Calendar.ISO functions (#8703) 2019-01-25 10:20:26 +01:00
José Valim 1a6b344ba8 Do not rely on timezone database for DateTime.now
The FakeTimeZoneDatabase doesn't have all timezone entries,
which means it would be just a matter of time for this test
to start failing.

Closes #8702.
2019-01-25 10:11:30 +01:00
Tobiasz Małecki 825c36cdb1 Add missing doc and spec to Calendar.ISO.time_to_string/5 (#8676) 2019-01-25 08:40:51 +01:00
José Valim d3de9717df Fix rounding for subnormal floats (#8687)
Closes #8685
2019-01-25 08:39:41 +01:00
José Valim c689975bf0 Support SOURCE_DATE_EPOCH for reproducible builds (#8694) 2019-01-25 08:31:37 +01:00
José Valim 374b945c40 Do not rely on map ordering when sorting specs, see #8689 2019-01-24 21:54:05 +01:00
José Valim 49c6bbf420 Improve docs for Access
A lot of confusion in the previous docs was caused by
trying to explain both bracket-based and dot-based
syntaxes in the same place. This made sense at the time
because those syntaxes were not described elsewhere.
But now we can link to other resources and focus the
docs specifically in the Access module.
2019-01-24 12:53:55 +01:00
Wojtek Mach c3d68c73cc Standardize on iodata variable name, as this is what docs use 2019-01-23 23:25:41 +01:00
Wojtek Mach 5d8df19e20 Convert private is_iodata macro to a private guard 2019-01-23 23:25:41 +01:00
Tobiasz Małecki 49a4bb8e28 Agent moduledoc improvement (#8674) 2019-01-22 17:44:10 +01:00
Eksperimental 6e19c7bf61 Make documentation accurate in File.cp* functions (#8627) 2019-01-22 17:27:57 +01:00
Eksperimental 0f7cc5ccde Use hexadecimal notation in code points in tokenizer error msg (#8669) 2019-01-22 13:39:40 +01:00
Eksperimental 63e24fb520 Improve documentation and info on charlists (#8645) 2019-01-22 09:01:09 +01:00
Eksperimental 84b70d226b Correct arity in List test (#8670) 2019-01-22 08:58:37 +01:00
Eksperimental fc211f77f2 Correct verb tenses (#8667) 2019-01-22 08:56:38 +01:00
Eksperimental c4a362f624 Name args in Range.disjoint?/2 (#8666) 2019-01-22 08:55:56 +01:00
Fernando Tapia Rico 131e9523a9 Optimize generated code for catch-all else clauses (#8661)
Elixir's with is expanded into a series of nested cases. For
example, this code:

    with {:ok, a} <- fun_a(),
         {:ok, b} <- fun_b() do
      wa = fun_w(a)
      wb = fun_w(b)
    else
      error -> {:c, error}
    end

would be expanded to something similar to this:

    case fun_a() do
      {:ok, a} ->
        case fun_b() do
          {:ok, b} ->
            wa = fun_w(a)
            wb = fun_w(b)

          var1 ->
            case var1 do
              error -> {:c, error}
              var2 -> error({with_clause, var2})
            end
        end

      var1 ->
        case var1 do
          error -> {:c, error}
          var2 -> error({with_clause, var2})
        end
    end

The generated code can be optimized for else clauses that
only contain a single catch-all clause (a variable that would
bind everything). Applying this optimization, the code of the
example above would be:

    case fun_a() do
      {:ok, a} ->
        case fun_b() do
          {:ok, b} ->
            wa = fun_w(a)
            wb = fun_w(b)

          error ->
            {:c, error}
        end

      error ->
        {:c, error}
    end
2019-01-22 08:53:24 +01:00
Eksperimental 14f95c0a49 Simplify guards in List.ascii_printable?/2 (#8656) 2019-01-22 08:50:48 +01:00
Wojtek Mach 22fcd3ff22 Update Module.spec_to_callback to keep existing specs and copy docs (#8663) 2019-01-21 19:49:44 +01:00
Eksperimental cd38956540 Improve docs in Module functions and raise errors (#8635) 2019-01-21 18:12:51 +01:00
Eksperimental b9953dfc7f Use "operating system" instead of OS (#8658) 2019-01-20 21:15:20 +01:00
Eksperimental 19db82f40d Add test to List.ascii_printable?/2 (#8655)
Add test that checks improper lists with limit
2019-01-20 19:23:09 +01:00
Eksperimental 981601517e Fix indentation in doctests (#8654) 2019-01-20 19:17:01 +01:00
José Valim 7dd78f90e6 Move code and macros to after processes and applications 2019-01-20 14:53:09 +01:00
farmio 375878e6a3 Fix a typo in the Library Guidelines page (#8651)
[ci skip]
2019-01-20 14:45:38 +01:00
Tyler Witt 2c85b088bb Update Kernel rounding documentation (#8648)
Updates Kernel.round/1 to describe what happens on half.
2019-01-20 09:08:41 +01:00
Saúl Cabrera 0b1b6e2e5b Fix typo in Task docs (#8650) 2019-01-20 09:08:21 +01:00
Ali Farhadi 1c255b31de Fix docs for DynamicSupervisor.start_child/2 (#8647)
[ci skip]
2019-01-19 12:25:18 +01:00
José Valim 64eb6af13a Rely on IO.warn whenever possible 2019-01-18 14:59:20 +01:00
José Valim 63f59af75f Avoid dialyzer warnings on formatter, closes #8631 2019-01-17 10:52:37 +01:00
Roman Smirnov c32c83f251 Fix parsing Markdown links for h function (fix #8629) (#8641) 2019-01-16 22:39:14 +01:00
Eksperimental 60ecf10dc7 Use ID and not id (#8639)
The command used to detect these entries:
ag -s "\b(?<![/:{_\[.])ids?(?![}:_\]])(?!\(\))(?!enti)(?!ea)(?!iom)(?!x)"  --elixir
2019-01-16 19:14:39 +01:00
Eksperimental 4cab974cd6 Add missing colon and backticks (#8638) 2019-01-16 16:04:52 +01:00
Eksperimental 3a79d6e670 Use PID instead of pid (#8628) 2019-01-16 15:39:39 +01:00
Eksperimental d6dd0b42f5 Add note to File.stat/2 and File.lstat/2 on optimization (#8632)
The note was taken from the :file.read_file_info/1 Erlang documentation.
2019-01-16 09:42:23 +01:00
Eksperimental c822ba34c6 Sort Module.__info__/1 options alphabetically (#8637) 2019-01-16 09:38:02 +01:00
Eksperimental 6b1bec4cf0 Mention Code.fetch_docs/1 and ExDoc in Module (#8634) 2019-01-16 09:31:28 +01:00
Eksperimental 1eea63e36e Replace use of "item(s)" with "element(s)" in List module (#8633)
The usage of items and elements was mixed,
but Erlang refers to them as Elements,
and Enumerable also refer to them as elements,
so I took the liberty to standardize its usage.
2019-01-16 09:28:50 +01:00
Eksperimental 9c7636d07f Standardize non-doctest example in Agent moduledoc (#8630) 2019-01-16 09:27:57 +01:00
Derek Kraan be55b995bc Use consistent variable naming in the docs (#8625) 2019-01-15 19:57:24 +01:00
Aleks Tkachenko bdff9c4958 Fix typo in GenServer docs (#8623) 2019-01-15 10:59:09 +01:00
José Valim 99d79e6405 Address bootstrap issue 2019-01-15 00:29:05 +01:00
José Valim 99949e0711 Format compatibilty table so it reads better online 2019-01-14 23:58:37 +01:00
José Valim 67f2bc42d7 Allow __MODULE__.Something in a nested defmodule
Defining __MODULE__.Something in a nested defmodule would fail
to compile. This commit address this:

    defmodule Foo do
      defmodule __MODULE__.Bar do
        __MODULE__ == Elixir.Foo.Bar
      end
    end

Since `__MODULE__` expands to a fully qualified name `Elixir.Foo`,
the nested module must then be `Elixir.Foo.Bar`. This commit also
fixes an alias leakage that would happen under such scenarios.

Another possible interpretation would be for it to return `Foo.Foo.Bar`.
However, that would mean we would not be able to access the module
right below its definition using `__MODULE__.Bar`, which means its
`Foo.Foo.Bar` would be the incorrect choice.
2019-01-14 23:58:37 +01:00
Nikita Avvakumov f78fa26181 Fix typo in DynamicSupervisor.init/1 docs (#8622) 2019-01-14 22:19:50 +01:00
José Valim dc98c9a127 Only perform behaviour checking if blaming 2019-01-13 13:29:52 +01:00
José Valim cd3e7ff51d Consistently forbid upcasting in calendar conversion functions 2019-01-12 09:47:55 +01:00
John Jacob 74a86373b4 Update typespec of drop to allow negative integer (#8614)
Drop allows negative integers for dropping from the end.
2019-01-11 22:29:51 +01:00