Commit Graph
5497 Commits
Author SHA1 Message Date
José Valim e50735ff2a Augment the Calendar APIs with utc date/time and last_day_of_the_month
Closes #5216
2016-09-14 23:29:18 +02:00
Josh Branchaud 72e9f9da01 Document additional options for String.split/3 (#5217)
Issue #5213
2016-09-14 21:04:53 +02:00
Pedro Medeiros 0d2870f050 Fix some exported from case from erlang source (#5214)
Some erlang code were emiting a warning message when some
variables were defined inside the case statement.
2016-09-14 13:45:32 +02:00
José Valim 50293b46f1 Keep markdown formatting on IO.ANSI.Docs
The previous format would use | before code blocks
and would remove # from headings, we have reverted
those changes to make the printed documentation and
help be closer to what it would look on source while
providing more information (in the case of headings).
2016-09-13 22:05:49 +02:00
Tai An Su 4f8adcbb14 Fix operators table (#5207) 2016-09-11 18:09:22 +02:00
José Valim 0396197026 Ensure take/2 does not consume next element on suspend 2016-09-11 00:05:53 +02:00
Andrea Leopardi ee04bd5a2f Refactor some error messages in OptionParser (#5203) 2016-09-10 18:08:31 +02:00
Andrea Leopardi f49963b66d Fix the name of the last argument to defmodule/2 and defprotocol/2 (#5201) 2016-09-10 12:45:11 +02:00
Jagtesh Chadha 465eb66028 Change argument 'val' to 'value' in Map.put/3 (#5198) 2016-09-09 23:38:15 +02:00
John Warwick 45627f0d07 Fix formatting in doctests for String.splitter/3 (#5195) 2016-09-08 21:50:41 +02:00
Michał Muskała dadf98fbff Introduce Process.send_after/4 (#5182) 2016-09-07 22:39:12 +02:00
José Valim b0102791c5 Correctly use stack name in all commands 2016-09-07 14:06:13 +02:00
José Valim 024a958726 Avoid naming conflicts 2016-09-07 13:53:00 +02:00
José Valim 6b6382a445 Ensure lhs of in/2 is expanded only once 2016-09-07 13:35:40 +02:00
José Valim 786da1ffe0 Add Kernel.rand/0 and Kernel.rand/1
Thanks to Hal Fulton for the proposal and original code.
2016-09-07 13:07:52 +02:00
Tobias Pfeiffer e4a9f81163 Specify that the timeout is expressed in milliseconds for increased clarity (#5186) 2016-09-07 12:35:08 +02:00
José Valim 24648e877d Use NUL instead of /dev/null on Windows
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2016-09-07 03:45:45 +02:00
Aleksei Magusev fd17c6fefa Produce meaningful warning when with's else clauses have no effect (#5179)
Isolated example:

  defmodule Foo do
    def foo(arg) do
      with foo = arg do
        foo
      else
        _ -> nil
      end
    end
  end
2016-09-04 01:55:39 +02:00
Gabriel Taylor-Russ e5db7958ec Grammatical improvements to the "Writing Documentation" page (#5180) 2016-09-02 18:09:47 +02:00
Michał Muskała d16b52e6b4 Align multiline when in specs to the standard (#5183) 2016-09-01 23:31:47 +02:00
Simone Vittori 709fd54688 Fix typos in file.ex (#5178) 2016-08-31 13:56:22 -04:00
LJZN 469885458a Make the docs for List.delete/2 unambiguous (#5172)
They could be confusing especially if read together with the
docs for List.delete_at/2 (since both use lists of integers, which
makes index vs element confusing). Using a list of atoms in
List.delete/2 makes things unambiguous for this function.
2016-08-29 13:46:53 +02:00
Andrea Leopardi b1d30d1805 Clean up code around Stream.zip/2
This commit contains no functional changes, but it renames a bunch of
variables and functions to make their purpose clearer and adds a couple
of informative comments.
2016-08-28 17:41:29 +02:00
Andrea Leopardi d977e6dd4a Wrap fn calls in parens in Macro.to_string/1 (#5170)
Right now, application of anonymous function literals in
Macro.to_string/2 is represented like this:

    iex> Macro.to_string(quote do: (fn x -> x end).(1))
    "fn x -> x end.(1)"

While this is valid, I think it's far more common to have such calls
with the literal fn wrapped in parens:

    (fn x -> x end).(1)

This commit makes Macro.to_string/2 behave like this.
2016-08-28 17:34:59 +02:00
Andrea Leopardi f1f6096ca1 Polish some code around Stream.zip/2 (#5169) 2016-08-28 17:28:30 +02:00
Andrea Leopardi 80dd444245 Add a "Guards" page to the docs (#5167) 2016-08-27 22:51:47 +02:00
Andrea Leopardi ffeaeea532 Mention the optional function in the docs for Macro.to_string/2 (#5168) 2016-08-27 22:09:03 +02:00
Jake Worth 61d732db87 Fix typo in List (#5166) 2016-08-27 06:14:47 +02:00
Andrea Leopardi 97796f4d55 Improve UndefinedFunctionError when using macros without require (#5156) 2016-08-26 23:51:25 +02:00
Andrea Leopardi 1b94cc7322 Don't crash in macro_exported?/3 when dealing with Erlang modules (#5165)
Right now, Kernel.macro_exported?/3 blindly calls __info__/1 on the
given module, but since __info__/1 is defined by Elixir when compiling
modules, this breaks if an Erlang module is passed to
macro_exported?/3. This commit fixes this behaviour by always returning
"false" in macro_exported?/3 when an Erlang module is given.
2016-08-26 20:20:58 +02:00
Andrea Leopardi 26e2798702 Kill a bunch of trailing whitespace lurking around 2016-08-26 17:41:35 +02:00
Humberto Rodríguez Avila 0ae29e9c1c Update special_forms.ex (#5162)
Add punctuation mark ","
2016-08-26 01:21:32 +02:00
Tommaso Pavese 63d90321cc Fix a typo in the name of a parameter in the ExDoc comment for File.stream!/3 (#5160) 2016-08-25 02:12:07 +02:00
Aleksei Magusev 805efd071d Use "In" instead of "Every" in the handle_info/2 example 2016-08-24 01:28:26 +02:00
José Valim bc36e993ae Expand on the use cases behind handle_info/2 2016-08-23 18:35:36 +02:00
Stanislav Mekhonoshin 3b02b22bda Add example of sending/handling custom messages to GenServer documentation (#5151) 2016-08-23 18:29:26 +02:00
James Fish 9e4d4724cd Clarify String.ends_with?/2 docs 2016-08-21 21:14:57 +01:00
Aleksei Magusev acbf7cab01 No need to provide nil default for defexception fields 2016-08-21 12:44:27 +02:00
Aleksei Magusev d7f6452b3b Enhance variable names in Stream.Reducers 2016-08-21 00:44:44 +02:00
Aleksei Magusev 258e971def Make Enum.drop/2 to use Stream.Reducers.drop/0 2016-08-20 12:54:31 +02:00
Aleksei Magusev eb67c2b21b Fix {Enum, Stream}.map_every/3 behaviour when nth is 0 2016-08-19 23:37:40 +02:00
Aleksei Magusev d0637648f4 Do not mention FunctionClauseError in the docs 2016-08-19 22:47:48 +02:00
Aleksei Magusev e0b1cf45c7 Fix DateTime.from_unix!/2 to actually raise ArgumentError 2016-08-19 22:47:03 +02:00
Aleksei Magusev 4079a68ef0 Suppress unused variable warnings in Enum 2016-08-19 21:07:07 +02:00
Andrea Leopardi d2b0ee38d3 Add a page in the docs about operators (#5142) 2016-08-19 00:36:37 +02:00
Hubert Jarosz 98fa2660bb fix #5144 (#5145)
Mention in <<>> macro documentation that also float
can use 'little' and 'big' modifiers.
2016-08-18 23:54:37 +02:00
José Valim 00d47ba522 Refactor and optimize aggregations over lists 2016-08-15 22:02:28 +02:00
Myron Marston 21d235bacc Add min/2, max/2 and min_max/2 to Enum (#5140) 2016-08-15 21:30:21 +02:00
Michał Muskała 8277dcd776 Make sure bad remote call errors have file/line info (#5116)
Change how we mark the generated AST for suppressing dialyzer errors -
instead of [generated: true, location: 0], we provide proper line number.
This means, however, that on OTP 18, those nodes won't be recognized
as generated and warnings will be issued.
It was decided that proper error messages are more important than
avoiding bogus dialyzer warnings.
The old mark for generated code is left in places that made compiler
issue warnings on 18.

The bad remote call dialyzer warnings can be suppressed with the
@dialyzer :no_fail_call
module attribute.
2016-08-15 13:18:09 +01:00
Otto Lin c26c269834 Support Enum.map_every/3 and Stream.map_every/3 (#5141) 2016-08-14 14:27:14 +02:00