Class: FalseClass

Inherits:
Object show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#&Object



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'ext/carray_numeric.c', line 59

static VALUE
rb_hack_and (VALUE x, VALUE y)
{
  if ( rb_obj_is_carray(y) ) {
    if ( rb_ca_is_boolean_type(y) ) {
      return rb_funcall(y, rb_intern("bit_and"), 1, x);
    }
    else {
#if RUBY_VERSION_CODE >= 190
      return rb_num_coerce_bin(x, y, '&');
#else
      return rb_num_coerce_bin(x, y);
#endif
    }
  }
  else {
    return rb_funcall(x, id___and__, 1, y);
  }
}

#*Object



129
130
131
132
133
# File 'ext/carray_numeric.c', line 129

static VALUE
rb_hack_star (VALUE x, VALUE y)
{
  return rb_funcall(y, rb_intern("*"), 1, x);
}

#^Object



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'ext/carray_numeric.c', line 79

static VALUE
rb_hack_xor (VALUE x, VALUE y)
{
  if ( rb_obj_is_carray(y) ) {
    if ( rb_ca_is_boolean_type(y) ) {
      return rb_funcall(y, rb_intern("bit_xor"), 1, x);
    }
    else {
#if RUBY_VERSION_CODE >= 190
      return rb_num_coerce_bin(x, y, '^');
#else
      return rb_num_coerce_bin(x, y);
#endif
    }
  }
  else {
    return rb_funcall(x, id___xor__, 1, y);
  }
}

#|(y) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'ext/carray_numeric.c', line 39

static VALUE
rb_hack_or(VALUE x, VALUE y)
{
  if ( rb_obj_is_carray(y) ) {
    if ( rb_ca_is_boolean_type(y) ) {
      return rb_funcall(y, rb_intern("bit_or"), 1, x);
    }
    else {
#if RUBY_VERSION_CODE >= 190
      return rb_num_coerce_bin(x, y, '|');
#else
      return rb_num_coerce_bin(x, y);
#endif
    }
  }
  else {
    return rb_funcall(x, id___or__, 1, y);
  }
}