зеркало из https://github.com/github/ruby.git
adjust indent and style
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
057098bfdc
Коммит
cc216f9aae
4
bignum.c
4
bignum.c
|
@ -4036,9 +4036,11 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
|
|||
if (c == '_') {
|
||||
if (++us >= 2)
|
||||
break;
|
||||
} else
|
||||
}
|
||||
else {
|
||||
us = 0;
|
||||
}
|
||||
}
|
||||
if (!(c = *str) || ISSPACE(c)) --str;
|
||||
}
|
||||
c = *str;
|
||||
|
|
3
dln.c
3
dln.c
|
@ -1192,7 +1192,8 @@ aix_loaderror(const char *pathname)
|
|||
ERRBUF_APPEND("\" ");
|
||||
}
|
||||
ERRBUF_APPEND("\n");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ERRBUF_APPEND(strerror(errno));
|
||||
ERRBUF_APPEND("[loadquery failed]");
|
||||
}
|
||||
|
|
6
gc.c
6
gc.c
|
@ -5562,7 +5562,8 @@ gc_stat(int argc, VALUE *argv, VALUE self)
|
|||
size_t value = 0;
|
||||
gc_stat_internal(arg, &value);
|
||||
return SIZET2NUM(value);
|
||||
} else if (!RB_TYPE_P(arg, T_HASH)) {
|
||||
}
|
||||
else if (!RB_TYPE_P(arg, T_HASH)) {
|
||||
rb_raise(rb_eTypeError, "non-hash or symbol given");
|
||||
}
|
||||
}
|
||||
|
@ -5581,7 +5582,8 @@ rb_gc_stat(VALUE key)
|
|||
size_t value = 0;
|
||||
gc_stat_internal(key, &value);
|
||||
return value;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
gc_stat_internal(key, 0);
|
||||
return 0;
|
||||
}
|
||||
|
|
14
io.c
14
io.c
|
@ -264,9 +264,11 @@ rb_cloexec_open(const char *pathname, int flags, mode_t mode)
|
|||
if (ret == -1) return -1;
|
||||
if (ret <= 2 || o_cloexec_state == 0) {
|
||||
rb_maygvl_fd_fix_cloexec(ret);
|
||||
} else if (o_cloexec_state > 0) {
|
||||
}
|
||||
else if (o_cloexec_state > 0) {
|
||||
return ret;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
o_cloexec_state = rb_fix_detect_o_cloexec(ret);
|
||||
}
|
||||
return ret;
|
||||
|
@ -1074,9 +1076,10 @@ io_flush_buffer_async2(VALUE arg)
|
|||
/* pending async interrupt is there. */
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
} else if (ret == 1) {
|
||||
}
|
||||
else if (ret == 1) {
|
||||
return 0;
|
||||
} else
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2716,7 +2719,8 @@ io_write_nonblock(VALUE io, VALUE str, int no_exception)
|
|||
if (errno == EWOULDBLOCK || errno == EAGAIN) {
|
||||
if (no_exception) {
|
||||
return ID2SYM(rb_intern("wait_writable"));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
rb_readwrite_sys_fail(RB_IO_WAIT_WRITABLE, "write would block");
|
||||
}
|
||||
}
|
||||
|
|
3
signal.c
3
signal.c
|
@ -1101,7 +1101,8 @@ init_sigchld(int sig)
|
|||
oldfunc = ruby_signal(sig, SIG_DFL);
|
||||
if (oldfunc != SIG_DFL && oldfunc != SIG_IGN) {
|
||||
ruby_signal(sig, oldfunc);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
GET_VM()->trap_list[sig].cmd = 0;
|
||||
}
|
||||
rb_enable_interrupt();
|
||||
|
|
3
string.c
3
string.c
|
@ -5823,7 +5823,8 @@ rb_str_squeeze_bang(int argc, VALUE *argv, VALUE str)
|
|||
*t++ = save = c;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
while (s < send) {
|
||||
unsigned int c;
|
||||
int clen;
|
||||
|
|
6
thread.c
6
thread.c
|
@ -1013,7 +1013,8 @@ getclockofday(struct timeval *tp)
|
|||
if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
|
||||
tp->tv_sec = ts.tv_sec;
|
||||
tp->tv_usec = ts.tv_nsec / 1000;
|
||||
} else
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
gettimeofday(tp, NULL);
|
||||
|
@ -1084,7 +1085,8 @@ timeofday(void)
|
|||
|
||||
if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) {
|
||||
return (double)tp.tv_sec + (double)tp.tv_nsec * 1e-9;
|
||||
} else
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
struct timeval tv;
|
||||
|
|
3
time.c
3
time.c
|
@ -2561,7 +2561,8 @@ obj2subsecx(VALUE obj, VALUE *subsecx)
|
|||
if (RB_TYPE_P(obj, T_STRING)) {
|
||||
obj = rb_str_to_inum(obj, 10, FALSE);
|
||||
*subsecx = INT2FIX(0);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
divmodv(num_exact(obj), INT2FIX(1), &obj, &subsec);
|
||||
*subsecx = w2v(rb_time_magnify(v2w(subsec)));
|
||||
}
|
||||
|
|
3
vm.c
3
vm.c
|
@ -149,7 +149,8 @@ vm_stat(int argc, VALUE *argv, VALUE self)
|
|||
hash = arg;
|
||||
else
|
||||
rb_raise(rb_eTypeError, "non-hash or symbol given");
|
||||
} else if (arg == Qnil) {
|
||||
}
|
||||
else if (NIL_P(arg)) {
|
||||
hash = rb_hash_new();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче