Exemplo n.º 1
0
Arquivo: mri.c Projeto: hkraji/looksee
static VALUE internal_instance_methods(VALUE klass, VISIBILITY_TYPE visibility) {
  add_method_if_matching_arg_t arg;
  arg.names = rb_ary_new();
  arg.visibility = visibility;

  Looksee_method_table_foreach(RCLASS_M_TBL(klass), add_method_if_matching, (st_data_t)&arg);
  return arg.names;
}
Exemplo n.º 2
0
/*
 * Return the list of undefined instance methods (as Symbols) of the
 * given internal class.
 */
VALUE Looksee_internal_undefined_instance_methods(VALUE self, VALUE klass) {
#if RUBY_VERSION >= 230
  static int warned = 0;
  if (!warned) {
    rb_warn("Looksee cannot display undef'd methods on MRI 2.3");
    warned = 1;
  }
  return rb_ary_new();
#else
  VALUE names = rb_ary_new();
  if (RCLASS_ORIGIN(klass) != klass)
    klass = RCLASS_ORIGIN(klass);
  Looksee_method_table_foreach(RCLASS_M_TBL(klass), add_method_if_undefined, (st_data_t)&names);
  return names;
#endif
}
Exemplo n.º 3
0
Arquivo: mri.c Projeto: hkraji/looksee
/*
 * Return the list of undefined instance methods (as Symbols) of the
 * given internal class.
 */
VALUE Looksee_internal_undefined_instance_methods(VALUE self, VALUE klass) {
  VALUE names = rb_ary_new();
  Looksee_method_table_foreach(RCLASS_M_TBL(klass), add_method_if_undefined, (st_data_t)&names);
  return names;
}