Skip to content

Commit 83ccde4

Browse files
author
José Valim
committed
Update CHANGELOG, fix tests and typespecs
1 parent 5990026 commit 83ccde4

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
# v0.13.3-dev
22

33
* Enhancements
4-
* [Kernel] `GenEvent`, `GenServer`, `Supervisor`, `Agent` and `Task` modules added
4+
* [OptionParser] Add `:strict` option that only parses known switches
5+
* [OptionParser] Add `next/2` useful for manual parsing of options
56
* [Macro] Add `Macro.prewalk/2/3` and `Macro.postwalk/2/3`
7+
* [Kernel] `GenEvent`, `GenServer`, `Supervisor`, `Agent` and `Task` modules added
68
* [Kernel] Make deprecations compiler warnings to avoid the same deprecation being printed multiple times
79

810
* Bug fixes
911
* [Enum] Fix `Enum.join/2` and `Enum.map_join/3` for empty binaries at the beginning of the collection
1012
* [ExUnit] Ensure the formatter doesn't error when printing :EXITs
1113
* [Kernel] Rename `ELIXIR_ERL_OPTS` to `ELIXIR_ERL_OPTIONS` for consistency with `ERL_COMPILER_OPTIONS`
14+
* [OptionParser] Parse `-` as a plain argument
15+
* [OptionParser] `--` is always removed from argument list on `parse/2` and when it is the leading entry on `parse_head/2`
1216

1317
* Soft deprecations (no warnings emitted)
1418
* [Dict] `Dict.Behaviour` is deprecated (please define the Dict functions yourself)
@@ -38,9 +42,8 @@
3842

3943
* Backwards incompatible changes
4044
* [Exception] Exceptions now generate structs instead of records
41-
* [String] `String.to_char_list/1` no longer returns a tuple and raises in case of failure (`String.to_char_list!/1` used to behave like that)
42-
* [String] `String.to_char_list!/1` is removed
43-
45+
* [OptionParser] Errors on parsing returns the switch and value as binaries (unparsed)
46+
* [String] `String.to_char_list/1` (previously deprecated) no longer returns a tuple and raises in case of failure
4447

4548
# v0.13.2 (2014-05-11)
4649

lib/elixir/lib/option_parser.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule OptionParser do
55

66
@type argv :: [String.t]
77
@type parsed :: Keyword.t
8-
@type errors :: Keyword.t
8+
@type errors :: [{String.t, String.t | nil}]
99
@type options :: [switches: Keyword.t, strict: Keyword.t, aliases: Keyword.t]
1010

1111
@doc """

lib/elixir/test/erlang/tokenizer_test.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ unquoted_atom_test() ->
4545
[{atom, 1, '&&'}] = tokenize(":&&").
4646

4747
quoted_atom_test() ->
48-
[{atom_string, 1, false, [<<"foo bar">>]}] = tokenize(":\"foo bar\"").
48+
[{atom_unsafe, 1, [<<"foo bar">>]}] = tokenize(":\"foo bar\"").
4949

5050
oversized_atom_test() ->
5151
OversizedAtom = [$:|string:copies("a", 256)],
@@ -56,7 +56,7 @@ op_atom_test() ->
5656

5757
kw_test() ->
5858
[{kw_identifier, 1, do}] = tokenize("do: "),
59-
[{kw_identifier_string, 1, false, [<<"foo bar">>]}] = tokenize("\"foo bar\": ").
59+
[{kw_identifier_unsafe, 1, [<<"foo bar">>]}] = tokenize("\"foo bar\": ").
6060

6161
integer_test() ->
6262
[{number, 1, 123}] = tokenize("123"),

0 commit comments

Comments
 (0)