1. 06 Jan, 2020 4 commits
  2. 05 Jan, 2020 2 commits
  3. 02 Jan, 2020 1 commit
  4. 01 Jan, 2020 11 commits
  5. 31 Dec, 2019 3 commits
  6. 30 Dec, 2019 3 commits
  7. 29 Dec, 2019 2 commits
  8. 28 Dec, 2019 2 commits
  9. 27 Dec, 2019 10 commits
  10. 25 Dec, 2019 2 commits
    • Yukihiro "Matz" Matsumoto's avatar
      Merge pull request #4907 from shuujii/fix-poteltially-use-of-wrong-method-cache · d6b89868
      Yukihiro "Matz" Matsumoto authored
      Fix potentially use of wrong method cache
      d6b89868
    • KOBAYASHI Shuji's avatar
      Fix potentially use of wrong method cache · 0b2d54f4
      KOBAYASHI Shuji authored
      #### Example (with `MRB_METHOD_CACHE`)
      
        ```ruby
        GC.start
        c = Class.new
        p c            #=> #<Class:0x7fd6a180e790>
        c.new          #=> cache `c.new`
        c = nil
        GC.start       #=> `c` is GCed
        r = Range.dup
        p r            #=> #<Class:0x7fd6a180e790>
                       #   [same pointer as `c`]
        r.new(2, 3)    #=> ArgumentError: 'initialize':
                       #   wrong number of arguments (2 for 0)
                       #   [`c.new` is called instead of `r.new`]
        ```
      
      #### Cause
      
        An entry of method cache is identified by class pointer and method
        id. However, reusing memory after GC may create a class with the same
        pointer as the cached class.
      
      #### Treatment
      
        Cleared method caches of the class when the class is GCed.
      0b2d54f4