Files
mruby-mruby/include/mruby
KOBAYASHI Shuji 0b2d54f4f1 Fix potentially use of wrong method cache
#### 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.
2019-12-25 21:31:10 +09:00
..
2019-12-09 20:50:41 +09:00
2019-08-18 20:12:44 +09:00
2019-08-18 20:12:44 +09:00
2019-08-18 20:12:44 +09:00
2019-09-29 23:55:38 +09:00
2019-08-18 20:12:44 +09:00
2019-08-18 20:12:44 +09:00
2019-08-18 20:12:44 +09:00
2019-08-18 20:12:44 +09:00
2019-09-16 11:14:13 +09:00
2019-08-18 20:12:44 +09:00
2019-08-18 20:12:44 +09:00
2019-08-18 20:12:44 +09:00
2019-11-19 18:58:11 +09:00