예제 #1
0
  Selector* Selector::create(STATE, Object* name) {
    Selector* sel = state->new_object<Selector>(G(selector));
    sel->name(state, (Symbol*)name);
    sel->send_sites(state, Array::create(state, 1));

    return sel;
  }
예제 #2
0
 void test_create() {
     Object* sym = state->symbol("blah");
     Selector* sel = Selector::create(state, sym);
     TS_ASSERT_EQUALS(sel->name(), sym);
     TS_ASSERT(sel->send_sites()->kind_of_p(state, G(array)));
 }