REBOL3 tracker
  0.9.12 beta
Ticket #0001965 User: anonymous

Project:



rss
TypeBug Statuscomplete Date26-Feb-2013 00:35
Versionalpha 111 CategoryParse Submitted byabolka
PlatformAll Severityminor Prioritynormal

Summary PARSE `THRU integer!` does not position correctly
Description PARSE's `TO integer` rule positions "AT" the given index:

>> parse "abcd" [to 2 p: (probe p)
"bcd"
== false

Dual to how TO/THRU behaves otherwise, `THRU integer` should move to the position "NEXT" to the given index:

>> parse "abcd" [thru 2 p: (probe p)
"cd"
== false

In R3, `THRU integer` currently does exactly the same thing as `TO integer`. In R2, `THRU integer` behaves as expected (as described above).
Example code
>> parse "abcd" [to 2 "bcd"]
== true

>> parse "abcd" [thru 2 "cd"]
== false  ;; Expected: true

Assigned ton/a Fixed inr3 master Last Update18-Aug-2013 22:15


Comments
(0003507)
Ladislav
26-Feb-2013 14:22

In the core-tests suite.
(0003522)
BrianH
27-Feb-2013 00:45

Fix by Andreas here: https://github.com/rebol/r3/pull/97

Date User Field Action Change
18-Aug-2013 22:15 abolka Fixedin Modified => r3 master
18-Aug-2013 13:35 Ladislav Status Modified pending => complete
27-Feb-2013 00:45 BrianH Status Modified submitted => pending
27-Feb-2013 00:45 BrianH Comment : 0003522 Added -
26-Feb-2013 14:22 Ladislav Comment : 0003507 Added -
26-Feb-2013 00:35 abolka Description Modified -
26-Feb-2013 00:35 abolka Code Modified -
26-Feb-2013 00:35 abolka Ticket Added -