1
0
mirror of https://github.com/danog/liquid.git synced 2024-12-02 13:27:46 +01:00
Commit Graph

18 Commits

Author SHA1 Message Date
nsf
1a2066b87e Properly handle variadic functions.
This commit addresses two issues:

1. For variadic functions 'convertCallArguments' was allocating exactly
   'len(args)' arguments, which might be less than required, as a result
   zero/default filling loop would panic with out of bounds error.

2. Even if we correctly allocate a proper amount of arguments, zero/default
   filling loop doesn't handle special variadic function type case, when last
   argument has a slice type and reflect API expects plain values as arguments.
   But actually we don't need that, because it's okay to omit variadic values
   altogether, hence the total amount of allocated arguments is
   max(len(args), rt.NumIn()-1).
2018-05-30 19:44:29 +05:00
Oliver Steele
b6c65ffee6 map[unhashable] returns nil instead of panic 2017-08-23 16:03:46 -04:00
Oliver Steele
a50dc106d2 Convert tests 2017-08-23 15:56:27 -04:00
Oliver Steele
d27c839ae3 variable names 2017-08-23 15:56:18 -04:00
Oliver Steele
1a12f12f1d Convert MapSlice -> map 2017-08-21 15:06:35 -04:00
Oliver Steele
bb24f32cbd list filters operate on MapSlice 2017-08-21 10:30:54 -04:00
Oliver Steele
e1c7224d9c variable names 2017-08-21 09:50:29 -04:00
Oliver Steele
6b15fbf6c7 Tests; implement map[nil] 2017-08-09 08:45:48 -04:00
Oliver Steele
fd4d34c403 Nil pointers are equal, even if different types 2017-08-09 08:42:42 -04:00
Oliver Steele
62f44fa728 Rearrange value methods w/in file 2017-08-09 08:16:36 -04:00
Oliver Steele
9852226d22 Restore m['str'] where m map[interface{}]interface{} 2017-08-08 19:31:33 -04:00
Oliver Steele
e39a1fe0d4 Fix array[nil] 2017-08-08 17:15:29 -04:00
Oliver Steele
51d7166e88 Package docs 2017-08-08 16:42:32 -04:00
Oliver Steele
83652f59db Actually cache the drop resolution 2017-08-03 15:20:56 +02:00
Oliver Steele
7f501ce512 Race test, benchmarks, for drop resolution 2017-08-03 15:20:56 +02:00
James Littlejohn
b2f5f1f9ac Fix struct PropertyValue attempting to use an invalid pointer 2017-08-01 11:27:32 +10:00
Oliver Steele
9866cbf5d7 Race condition 2017-07-27 18:30:03 -04:00
Oliver Steele
6269836192 Move pkg evaluator -> values 2017-07-27 18:11:37 -04:00