Skip to content

Commit

Permalink
Singleton classes can't have subclasses.
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Oct 16, 2014
1 parent 250f551 commit f7e4f42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vm/builtin/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,8 @@ namespace rubinius {
}

Object* Module::track_subclass(STATE, Module* mod) {
if(try_as<SingletonClass>(mod)) return cNil;

if(hierarchy_subclasses_->nil_p()) {
hierarchy_subclasses(state, Array::create(state, 4));
}
Expand Down

0 comments on commit f7e4f42

Please sign in to comment.