#1184 CIrcularQueue resize() method removes too many items

v4.2.0
closed
Rick McGuire
None
complete
1
2014-04-15
2013-06-05
Erich
No

CircularQueue method resize() will remove items from the queue, even if they'd all fit within the new size. Here's an example:

c=.circularQueue~new(5)
c~push(1)
c~push(2)
say '['c']'
c~resize(3)      -- same for c~resize(3,'L')
say '['c']'

Output is

[2,1]
[]

resize() should only remove items, if the current number of items don't fit into the new size

Discussion

  • Rick McGuire
    Rick McGuire
    2013-11-24

    • status: open --> accepted
    • assigned_to: Rick McGuire
    • Pending work items: none --> tests
     
  • Rick McGuire
    Rick McGuire
    2013-12-02

    • status: accepted --> pending
    • Pending work items: tests --> complete
     


Anonymous


Cancel   Add attachments