Permalink
Commits on Jul 2, 2016
  1. updates rockspec

    committed Jul 2, 2016
  2. bump version to 4.1.0

    committed Jul 2, 2016
  3. Merge pull request #41 from kikito/simplify

    simplifies isInstanceOf & isSubclassOf. Fixes #39
    committed on GitHub Jul 2, 2016
  4. simplifies isInstanceOf & isSubclassOf. Fixes #39

    committed Jul 2, 2016
Commits on Mar 20, 2016
  1. Update UPDATING.md

    committed Mar 20, 2016
Commits on Jan 2, 2016
  1. fixes luacheck errors

    committed Jan 2, 2016
  2. adds luacheck to travis

    committed Jan 2, 2016
Commits on Dec 31, 2015
  1. adds rockspec for v4.0

    committed Dec 31, 2015
  2. Merge branch 'v4.0'

    committed Dec 31, 2015
Commits on Dec 30, 2015
Commits on Dec 28, 2015
  1. update changelog

    committed Dec 28, 2015
Commits on Dec 27, 2015
  1. adds coveralls badge

    committed Dec 27, 2015
Commits on Dec 26, 2015
  1. attempts to use luacov

    committed Dec 26, 2015
Commits on Dec 13, 2015
Commits on Dec 10, 2015
  1. Merge branch 'index-newindex' of https://github.com/mpeterv/middleclass

    … into mpeterv-index-newindex
    committed Dec 10, 2015
Commits on Nov 28, 2015
  1. Do not wrap __newindex

    mpeterv committed Nov 28, 2015
Commits on Nov 24, 2015
  1. Support __index and __newindex metamethods

    Separate instance dictionary and instance metatable.
    When defining a metamethod and it's __index or __newindex,
    wrap it in a function, so that it's used only when the key
    is missing in the whole dictionary chain.
    
    class.__metamethods table is now redundant; raw access of instance
    dictionary can be used to check if a metamethod is defined in a class.
    mpeterv committed Nov 24, 2015
Commits on Nov 23, 2015
  1. add 3.2.0 rockspec

    committed Nov 23, 2015
  2. bump version to 3.2.0

    committed Nov 23, 2015
  3. Refactoring and renaming

    committed Nov 23, 2015
  4. propogate -> propagate

    committed Nov 23, 2015
Commits on Nov 19, 2015
  1. Add tests for __mode

    mpeterv committed Nov 19, 2015
  2. Add tests for __metatable

    mpeterv committed Nov 19, 2015
  3. Fix __gc tests

    Tests for inherited __gc used to pass even without the feature being
    implemented, most likely because objects from previous tests got
    collected just in time.
    mpeterv committed Nov 19, 2015
  4. Support inheriting __gc, __mode, __metatable

    Do not directly set metatable of an instance dict to super's
    instance dict so that special metamethods do not affect it.
    mpeterv committed Nov 19, 2015
  5. Implement inheritable metamethods without stubs

    In __newindex metamethods of each Class detect if
    a metamethod is assigned. In that case, propogate assignment
    to all child classes that do not overwrite the metamethod.
    Track set of metamethods each class defines itself.
    On subclassing, copy all parent metamethods to child.
    
    Benefits of this approach:
    
    * Objects only have metamethods when they are, in fact, defined.
      Ignoring overhead, the problem with stubs is that other libraries,
      seeing a stub metamethod, could try to call it and get an error
      if it's missing in the class. E.g. various deep comparison functions
      often try to detect and use __eq.
    * Non-function metafields such as __metatable can be used.
    * Less overhead when using metamethods (but more when defining them).
    mpeterv committed Nov 19, 2015