#1184 CIrcularQueue resize() method removes too many items

v4.2.0
closed
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-22
    • Group: 4.1.2 --> None
     
  • Rick McGuire

    Rick McGuire - 2013-11-23
    • Group: None --> v4.2.0
     
  • Rick McGuire

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

    Rick McGuire - 2013-11-24

    Code committed [r9556]

     

    Related

    Commit: [r9556]

  • Rick McGuire

    Rick McGuire - 2013-12-02
    • status: accepted --> pending
    • Pending work items: tests --> complete
     
  • Rick McGuire

    Rick McGuire - 2013-12-02

    Tests committed [r9603]

     

    Related

    Commit: [r9603]

  • Rick McGuire

    Rick McGuire - 2014-04-15
    • status: pending --> closed
     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks