зеркало из https://github.com/github/ruby.git
Adjust styles [ci skip]
This commit is contained in:
Родитель
b5cf356447
Коммит
92d2476208
|
@ -5277,8 +5277,7 @@ static VALUE
|
||||||
collect_const_segments(rb_iseq_t *iseq, const NODE *node)
|
collect_const_segments(rb_iseq_t *iseq, const NODE *node)
|
||||||
{
|
{
|
||||||
VALUE arr = rb_ary_new();
|
VALUE arr = rb_ary_new();
|
||||||
for (;;)
|
for (;;) {
|
||||||
{
|
|
||||||
switch (nd_type(node)) {
|
switch (nd_type(node)) {
|
||||||
case NODE_CONST:
|
case NODE_CONST:
|
||||||
rb_ary_unshift(arr, ID2SYM(node->nd_vid));
|
rb_ary_unshift(arr, ID2SYM(node->nd_vid));
|
||||||
|
@ -9042,7 +9041,8 @@ compile_colon2(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node,
|
||||||
ISEQ_BODY(iseq)->ic_size++;
|
ISEQ_BODY(iseq)->ic_size++;
|
||||||
ADD_INSN1(ret, node, opt_getconstant_path, segments);
|
ADD_INSN1(ret, node, opt_getconstant_path, segments);
|
||||||
RB_OBJ_WRITTEN(iseq, Qundef, segments);
|
RB_OBJ_WRITTEN(iseq, Qundef, segments);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
/* constant */
|
/* constant */
|
||||||
DECL_ANCHOR(pref);
|
DECL_ANCHOR(pref);
|
||||||
DECL_ANCHOR(body);
|
DECL_ANCHOR(body);
|
||||||
|
@ -9083,7 +9083,8 @@ compile_colon3(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node,
|
||||||
VALUE segments = rb_ary_new_from_args(2, ID2SYM(idNULL), ID2SYM(node->nd_mid));
|
VALUE segments = rb_ary_new_from_args(2, ID2SYM(idNULL), ID2SYM(node->nd_mid));
|
||||||
ADD_INSN1(ret, node, opt_getconstant_path, segments);
|
ADD_INSN1(ret, node, opt_getconstant_path, segments);
|
||||||
RB_OBJ_WRITTEN(iseq, Qundef, segments);
|
RB_OBJ_WRITTEN(iseq, Qundef, segments);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
ADD_INSN1(ret, node, putobject, rb_cObject);
|
ADD_INSN1(ret, node, putobject, rb_cObject);
|
||||||
ADD_INSN1(ret, node, putobject, Qtrue);
|
ADD_INSN1(ret, node, putobject, Qtrue);
|
||||||
ADD_INSN1(ret, node, getconstant, ID2SYM(node->nd_mid));
|
ADD_INSN1(ret, node, getconstant, ID2SYM(node->nd_mid));
|
||||||
|
|
|
@ -1957,7 +1957,8 @@ r_object_for(struct load_arg *arg, bool partial, int *ivp, VALUE extmod, int typ
|
||||||
if (sign == '-') {
|
if (sign == '-') {
|
||||||
v = rb_int_uminus(v);
|
v = rb_int_uminus(v);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
data = r_bytes0(len * 2, arg);
|
data = r_bytes0(len * 2, arg);
|
||||||
v = rb_integer_unpack(RSTRING_PTR(data), len, 2, 0,
|
v = rb_integer_unpack(RSTRING_PTR(data), len, 2, 0,
|
||||||
INTEGER_PACK_LITTLE_ENDIAN | (sign == '-' ? INTEGER_PACK_NEGATIVE : 0));
|
INTEGER_PACK_LITTLE_ENDIAN | (sign == '-' ? INTEGER_PACK_NEGATIVE : 0));
|
||||||
|
|
3
proc.c
3
proc.c
|
@ -2586,7 +2586,8 @@ convert_umethod_to_method_components(const struct METHOD *data, VALUE recv, VALU
|
||||||
const rb_method_entry_t *me;
|
const rb_method_entry_t *me;
|
||||||
if (clone) {
|
if (clone) {
|
||||||
me = rb_method_entry_clone(data->me);
|
me = rb_method_entry_clone(data->me);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
me = data->me;
|
me = data->me;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче