José Valim
20418a14f7
Refactor Enum.chunks to use Enumerable.reduce/3, avoiding starting lazy collections twice
2013-08-20 14:08:27 +02:00
José Valim
3e1099830a
Properly handle @file that comes from warnings
2013-08-20 11:39:29 +02:00
Anthony Grimes
7f00aded18
Add Enum.chunks.
2013-08-20 00:48:42 -07:00
José Valim
84a2b31221
Add Macro.to_string/2
2013-08-19 18:21:42 +02:00
José Valim
f84b4121ce
Allow << _ :: utf8 >> <> binary in matches, closes #1619
2013-08-18 14:36:54 +02:00
José Valim
ff2af55e1d
Improve warning for ungrouped clauses
2013-08-18 10:05:36 +02:00
José Valim
a45a2c9d93
Allow erlang options when compiling elixir regexes
2013-08-17 11:57:17 +02:00
José Valim
aaebf84440
Always stop on --, even for parse
2013-08-16 09:28:58 +02:00
Peter Minten
081dbceeee
Macro.to_string: don't add unneeded binop parens
...
This changes the `Macro.to_string` output of (quoted) `1+2+3+4` from
`((1 + 2) + 3) + 4` to `1 + 2 + 3 + 4`.
2013-08-15 14:05:37 +02:00
José Valim
eb9753ddd1
Limit inspect by default, closes #1595
2013-08-15 10:35:04 +02:00
Eric Meadows-Jonsson
35af4348ae
Macro.to_string handles access and kw-lists nicer
2013-08-14 22:10:48 +02:00
José Valim
6ac280e17c
Clean up and expose are more complete API in Exception
2013-08-14 12:55:13 +02:00
José Valim
db47bd56b4
Add Path.relative_to_cwd and rely on it when generating stacktraces
2013-08-14 12:36:54 +02:00
José Valim
cea31f69dc
Review and deprecate list <-> binary conversion
2013-08-14 11:16:37 +02:00
José Valim
8affa706b7
Merge pull request #1593 from vanstee/string-justification-functions
...
Implement string justification functions
2013-08-13 23:27:04 -07:00
vanstee
0850430768
Only accept a single character as padding
2013-08-13 11:07:02 -04:00
vanstee
b14617ca90
Do not truncate strings when justifying
2013-08-13 10:53:27 -04:00
vanstee
0276419f4e
Implement rjust and ljust string functions
...
To provide string justification, the following functions were
implemented:
* `String.rjust/2`
* `String.rjust/3`
* `String.ljust/2`
* `String.ljust/3`
2013-08-13 10:28:40 -04:00
vanstee
b710ebd5e6
Return an empty string from slice with valid index
...
To keep in line with ruby semantics of
[`String#slice`](http://ruby-doc.org/core-2.0/String.html#method-i-slice )
slice should return an empty string instead of nil when the starting
index is valid even if the length is 0.
Fixes #1591
2013-08-13 09:45:08 -04:00
José Valim
52188fab89
Move from unicode to list to String.to_char_list
2013-08-13 08:39:16 +02:00
José Valim
19ac199b06
Move from unicode to binary to String.from_char_list
2013-08-13 08:39:16 +02:00
José Valim
82d8d2ad63
Deprecate Dict.update/3 in favor of Dict.update!/3
...
A non-raising version that yields nil will be added in
upcoming releases.
2013-08-13 08:39:16 +02:00
vanstee
742219339c
Support removing unicode characters with strip
...
Thanks for the suggested fix @josevalim
2013-08-11 16:49:15 -04:00
José Valim
9daa0bc3a2
Support IO.stream/2 and IO.binstream/2 and deprecate current IO.sream/1 and IO.binstream/1
...
Closes #1582
2013-08-11 15:48:31 +02:00
José Valim
b0317a8e18
Allow capture on anonymous function calls
2013-08-11 15:16:00 +02:00
José Valim
d3cb41614b
Merge pull request #1561 from thmzlt/option-parser-invalid-options
...
Improve OptionParser switch validation
2013-08-11 02:54:18 -07:00
vanstee
ad67e4935a
Return error when tokenizing oversized atom
...
When "atomizing" an unsafe string, we need to make sure the atom length
is going to be less than the system limit (255). Any function calling
`unsafe_to_atom` checks for an error and returns it if present.
2013-08-10 17:10:47 -04:00
José Valim
de72fa2012
Merge pull request #1579 from pminten/add-location-of-overridden-def
...
Add location of overridden def in warning message
2013-08-10 06:42:38 -07:00
José Valim
55de57ced6
Ensure proper line on interpolations inside heredocs, closes #1581
2013-08-10 15:40:02 +02:00
José Valim
70421e79b1
Fix bug on sorting algorithm on certain branches, closes #1580
2013-08-10 13:28:29 +02:00
Peter Minten
a538e86c0c
Put overridden def test in warning_test.exs
...
This removes the need for a separate fixture.
2013-08-10 13:18:34 +02:00
Peter Minten
e18ae5e335
Add test for overridden def warning
2013-08-10 11:59:50 +02:00
Guillermo Iguaran
ed7965e257
Add Enum.flat_map
...
Returns a new collection appending the result of invoking `fun`
on each corresponding item of `collection`.
2013-08-10 02:36:16 -05:00
Thomaz Leite
abbbcdf659
Update OptionParser test for permanent invalid list
2013-08-09 09:52:15 -07:00
Thomaz Leite
06bc04a7bf
Improve OptionParser switch validation
...
This adds a third element to the tuple returned from OptionParser.parse/2 when the value for an option doesn't match its switch type.
2013-08-09 09:52:15 -07:00
José Valim
730c0992b5
Add Dict.Behaviour to CHANGELOG
2013-08-09 08:42:09 +02:00
José Valim
bae0a46bab
Merge pull request #1571 from sasa1977/dict_behaviour
...
added Dict.Behaviour
2013-08-08 23:37:02 -07:00
sasa1977
47316bcae7
modifications according to comments from the pull request
2013-08-08 18:16:08 +02:00
José Valim
b83eb85a25
Slight clean up on dict_test.exs
2013-08-08 17:28:01 +02:00
sasa1977
596f62c57e
added Dict.Behaviour
2013-08-08 14:58:12 +02:00
José Valim
156905d684
Deprecate Enum.min/2 and Enum.max/2 in favor of Enum.min_by/2 and Enum.max_by/2
2013-08-07 08:26:06 +02:00
Guillermo Iguaran
4906f22479
Add Enum.reduce/2 that sets initial value of acc to the first element of collection
...
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
Conflicts:
lib/elixir/lib/enum.ex
2013-08-07 08:04:06 +02:00
José Valim
35282e1d35
Fix a bug in insert_at adding items to the wrong location with negative indexes
2013-08-07 07:56:03 +02:00
sasa1977
7c8b183513
List.replace_at
2013-08-06 23:34:39 +02:00
meh
09f5a84a13
Add regex pattern support to String.replace
2013-08-06 20:27:02 +02:00
José Valim
93eea5dd6d
Reduce the ammount of module binaries being passing around
2013-08-06 17:21:40 +02:00
José Valim
a8cee02558
Fix regression on do/end blocks, closes #1551
2013-08-06 15:44:52 +02:00
José Valim
bd21251659
Merge pull request #1546 from fishcakez/supervisor-shutdown
...
Fix default shutdown of child supervisors to infinity
2013-08-04 11:53:06 -07:00
James Fish
5bbaeee149
Fix default shutdown of child supervisors to infinity
...
A supervisor should wait for a child supervisor to shutdown its
children, and not kill it. By killing a supervisor you may prevent the
correct termination of processes further down the supervision tree.
2013-08-04 19:15:34 +01:00
José Valim
6470a36e68
Ensure watched extensions trigger full recompilation on change
2013-08-04 19:22:15 +02:00