REBOL3 tracker
  0.9.12 beta
Ticket #0001979 User: anonymous

Project:



rss
TypeBug Statuspending Date1-Mar-2013 21:28
Versionr3 master CategoryNative Submitted bySunanda
PlatformAll Severitymajor Prioritynormal

Summary APPEND can create duplicate words in an object
Description ob: object []
append ob [b: 2 b: 3 b: 4]
== make object! [
b: 2
b: 3
b: 4
]

foreach w words-of ob [print get w] ;; they are actually different
2
3
4

This does not happen if the word is already in the object (unless it is hidden)/
Example code
ob: object []
append ob  [b: 2 b: 3 b: 4]  ;; not sure if append should error out or silently discard duplicate values
(length? words-of ob) = 1   ;; not one is bad
ob/b = 2            ;; other value is bad

Assigned ton/a Fixed in- Last Update27-Sep-2013 21:11


Comments
(0003655)
MarcS
14-Mar-2013 23:18

Proposed fix and discussion: https://github.com/rebol/r3/pull/105
(0004019)
Ladislav
26-Sep-2013 23:19

In the core-tests suite.
(0004021)
BrianH
27-Sep-2013 02:38

Have APPEND silently override duplicate values, taking the last specified value as the one that wins. That is consistent with the behavior of APPEND when it has words that already exist in the object before the append.
(0004022)
Ladislav
27-Sep-2013 21:10

Fixed by https://github.com/rebol/rebol/pull/153

Date User Field Action Change
27-Sep-2013 21:11 Ladislav Status Modified submitted => pending
27-Sep-2013 21:10 Ladislav Comment : 0004022 Added -
27-Sep-2013 13:21 Ladislav Description Modified -
27-Sep-2013 13:21 Ladislav Code Modified -
27-Sep-2013 13:21 Ladislav Severity Modified minor => major
27-Sep-2013 02:38 BrianH Comment : 0004021 Added -
26-Sep-2013 23:19 Ladislav Comment : 0004019 Added -
15-Mar-2013 20:11 marcs Comment : 0003655 Modified -
14-Mar-2013 23:18 marcs Comment : 0003655 Added -
1-Mar-2013 21:28 sunanda Ticket Added -