Commit 0851817
committed
prevent nil return when pairs iterates through empty space
Before this patch pairs returns "nil" if target space was empty.
The reason is "has next" method of Iterator class that returns
true before first get. This patch removes "has_next" call from lua
generator function.
Closes #821 parent a490b54 commit 0851817
2 files changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
| 227 | + | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
230 | | - | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
0 commit comments