Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-5666

Define #resizable instance and class methods for Set

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Dev Exp

      This is a bug which breaks some array-like behavor for set. The #resizable method should return true for "objects whose size can be changed". Currently:

      • Array.resizable? #=> true
      • Array.new#resizable? #=> true
      • Set.resizable? #=> false (should be true)
      • Set.new#resizable? #=> false (should be true)

      Note that Set's size can be changed, for instance:

      s = Set[1, 2]

      s << 3  #=> #<Set: {1, 2, 3}>

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            shields@tablecheck.com Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: