Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

Commit ac8dc8d

Browse files
committed
Fix desc ranges for Loop
1 parent e33173c commit ac8dc8d

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

RME.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -17023,7 +17023,8 @@ def loop_for(array)
1702317023
end
1702417024

1702517025
def loop_range(a, b)
17026-
loop_for((a..b).to_a)
17026+
range = (a > b) ? (b..a).to_a.reverse : (a..b).to_a
17027+
loop_for(range)
1702717028
end
1702817029

1702917030
def loop_times(i)

project/Data/CommonEvents.rvdata2

-248 Bytes
Binary file not shown.

src/Incubator/loop.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ def loop_for(array)
126126
end
127127

128128
def loop_range(a, b)
129-
loop_for((a..b).to_a)
129+
range = (a > b) ? (b..a).to_a.reverse : (a..b).to_a
130+
loop_for(range)
130131
end
131132

132133
def loop_times(i)

0 commit comments

Comments
 (0)