File tree 2 files changed +18
-3
lines changed
2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 534
534
sym = SYM_YEAR + Int32 (arg ) - 1 ;
535
535
}
536
536
537
- if (sym < SYM_YEAR || sym > SYM_JULIAN )
538
- return PE_BAD_SELECT ;
537
+ if (sym < SYM_YEAR || sym > SYM_JULIAN ) {
538
+ //@@ https://github.com/Oldes/Rebol-issues/issues/1375
539
+ return (val ) ? PE_BAD_SELECT : PE_NONE ;
540
+ }
539
541
540
542
if (sym == SYM_TIMEZONE ) {
541
543
asTimezone = TRUE;
Original file line number Diff line number Diff line change @@ -110,6 +110,19 @@ Rebol [
110
110
--assert d/time = 0:10
111
111
--assert d/date = 1-Jan-2000
112
112
113
+ --test-- "issue 1375"
114
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/1375
115
+ ; none instead of error for an out-of-range ordinal selector
116
+ d: now
117
+ --assert none? try [d/0 ]
118
+ --assert none? try [d/-1 ]
119
+ --assert none? try [d/100 ]
120
+ ; consistent with time:
121
+ t: now /time
122
+ --assert none? try [t/0 ]
123
+ --assert none? try [t/-1 ]
124
+ --assert none? try [t/100 ]
125
+
113
126
===end-group===
114
127
115
128
===start-group=== "DATE/TIMEZONE"
@@ -170,7 +183,7 @@ Rebol [
170
183
--test-- "query/mode date"
171
184
date: 8-Apr-2020 ; no time!
172
185
--assert equal? query /mode date all-date-words [2020 4 8 #[none] 2020 -04 -08 #[none] #[none] #[none] #[none] 3 99 #[none] 2020 -04 -08 99 ]
173
-
186
+
174
187
===end-group===
175
188
176
189
You can’t perform that action at this time.
0 commit comments