Lines Matching +defs:mod +defs:type

101  *  example, perform type conversion across <code>==</code>, but not across
783 * def self.extended(mod)
784 * puts "#{self} extended in #{mod}"
805 * def A.included(mod)
806 * puts "#{self} included in #{mod}"
824 * def self.prepended(mod)
825 * puts "#{self} prepended to #{mod}"
1393 * mod.to_s -> string
1437 * mod.freeze -> mod
1439 * Prevents further modifications to <i>mod</i>.
1445 rb_mod_freeze(VALUE mod)
1447 rb_class_name(mod);
1448 return rb_obj_freeze(mod);
1453 * mod === obj -> true or false
1456 * instance of <i>mod</i> or one of <i>mod</i>'s descendants. Of
1462 rb_mod_eqq(VALUE mod, VALUE arg)
1464 return rb_obj_is_kind_of(arg, mod);
1469 * mod <= other -> true, false, or nil
1471 * Returns true if <i>mod</i> is a subclass of <i>other</i> or
1480 rb_class_inherited_p(VALUE mod, VALUE arg)
1482 VALUE start = mod;
1484 if (mod == arg) return Qtrue;
1489 while (mod) {
1490 if (RCLASS_M_TBL(mod) == RCLASS_M_TBL(arg))
1492 mod = RCLASS_SUPER(mod);
1494 /* not mod < arg; check if mod > arg */
1505 * mod < other -> true, false, or nil
1507 * Returns true if <i>mod</i> is a subclass of <i>other</i>. Returns
1515 rb_mod_lt(VALUE mod, VALUE arg)
1517 if (mod == arg) return Qfalse;
1518 return rb_class_inherited_p(mod, arg);
1524 * mod >= other -> true, false, or nil
1526 * Returns true if <i>mod</i> is an ancestor of <i>other</i>, or the
1535 rb_mod_ge(VALUE mod, VALUE arg)
1541 return rb_class_inherited_p(arg, mod);
1546 * mod > other -> true, false, or nil
1548 * Returns true if <i>mod</i> is an ancestor of <i>other</i>. Returns
1556 rb_mod_gt(VALUE mod, VALUE arg)
1558 if (mod == arg) return Qfalse;
1559 return rb_mod_ge(mod, arg);
1575 rb_mod_cmp(VALUE mod, VALUE arg)
1579 if (mod == arg) return INT2FIX(0);
1584 cmp = rb_class_inherited_p(mod, arg);
1595 VALUE mod = rb_module_new();
1597 RBASIC(mod)->klass = klass;
1598 return mod;
1609 * Module.new -> mod
1610 * Module.new {|mod| block } -> mod
1645 * Class.new(super_class=Object) { |mod| ... } -> a_class
1907 * mod.const_get(sym, inherit=true) -> obj
1908 * mod.const_get(str, inherit=true) -> obj
1910 * Checks for a constant with the given name in <i>mod</i>
1912 * the ancestors (and +Object+ if <i>mod</i> is a +Module+.)
1940 rb_mod_const_get(int argc, VALUE *argv, VALUE mod)
1982 mod = rb_cObject;
2005 if (!RB_TYPE_P(mod, T_MODULE) && !RB_TYPE_P(mod, T_CLASS)) {
2016 else if (!rb_method_basic_definition_p(CLASS_OF(mod), id_const_missing)) {
2030 mod = RTEST(recur) ? rb_const_get(mod, id) : rb_const_get_at(mod, id);
2033 return mod;
2038 * mod.const_set(sym, obj) -> obj
2049 rb_mod_const_set(VALUE mod, VALUE name, VALUE value)
2057 rb_const_set(mod, id, value);
2063 * mod.const_defined?(sym, inherit=true) -> true or false
2065 * Checks for a constant with the given name in <i>mod</i>
2067 * the ancestors (and +Object+ if <i>mod</i> is a +Module+.)
2077 rb_mod_const_defined(int argc, VALUE *argv, VALUE mod)
2102 return RTEST(recur) ? rb_const_defined(mod, id) : rb_const_defined_at(mod, id);
2219 * mod.class_variable_get(symbol) -> obj
2381 rb_convert_type(VALUE val, int type, const char *tname, const char *method)
2385 if (TYPE(val) == type) return val;
2387 if (TYPE(v) != type) {
2394 rb_check_convert_type(VALUE val, int type, const char *tname, const char *method)
2399 if (TYPE(val) == type && type != T_DATA) return val;
2402 if (TYPE(v) != type) {
2850 * When a new class is created, an object of type Class is initialized and