Skip to content

Commit 1dcabe6

Browse files
committed
Мелкие исправления
1 parent 6156c50 commit 1dcabe6

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/com/annimon/ownlang/lib/modules/files.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,7 @@ protected Value execute(FileInfo fileInfo, Value[] args) throws IOException {
280280
} else {
281281
time = (long) args[1].asNumber();
282282
}
283-
fileInfo.file.setLastModified(time);
284-
return NumberValue.ONE;
283+
return NumberValue.fromBoolean(fileInfo.file.setLastModified(time));
285284
}
286285
}
287286

src/com/annimon/ownlang/lib/modules/functions/std_range.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ public RangeValue(long from, long to, long step) {
5757
this.from = from;
5858
this.to = to;
5959
this.step = step;
60-
// x = range(0, 10, 2)
61-
// 0, 2, 4, 6, 8 | 0..10 step 2
62-
// 0, 3, 6, 9 | 0..10 step 3
63-
// 0, 4, 8 | 0..10 step 4
6460
final long base = (from < to) ? (to - from) : (from - to);
6561
final long absStep = (step < 0) ? -step : step;
6662
this.size = (int) (base / absStep + (base % absStep == 0 ? 0 : 1));
@@ -147,6 +143,9 @@ public Value next() {
147143
value += stepInt;
148144
return NumberValue.of(result);
149145
}
146+
147+
@Override
148+
public void remove() { }
150149
};
151150
}
152151
return new Iterator<Value>() {
@@ -164,6 +163,9 @@ public Value next() {
164163
value += step;
165164
return NumberValue.of(result);
166165
}
166+
167+
@Override
168+
public void remove() { }
167169
};
168170
}
169171

0 commit comments

Comments
 (0)