1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* removed spaces just before tabs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-11-26 05:25:08 +00:00
parent f5202fdbc7
commit 4d786d21e3
15 changed files with 35 additions and 35 deletions

View file

@ -1904,8 +1904,8 @@ bigmul1_karatsuba(VALUE x, VALUE y)
if (!BIGZEROP(xl) && !BIGZEROP(yl)) {
/* t2 <- xl * yl */
t2 = bigmul0(xl, yl);
t2n = big_real_len(t2);
t2 = bigmul0(xl, yl);
t2n = big_real_len(t2);
/* copy t2 into low bytes of the result (z0) */
MEMCPY(zds, BDIGITS(t2), BDIGIT, t2n);
@ -2013,7 +2013,7 @@ dump_bignum(VALUE x)
long i;
printf("0x0");
for (i = RBIGNUM_LEN(x); i--; ) {
printf("_%08x", BDIGITS(x)[i]);
printf("_%08x", BDIGITS(x)[i]);
}
puts("");
}
@ -2041,7 +2041,7 @@ bigmul0(VALUE x, VALUE y)
normal:
if (x == y) return bigsqr_fast(x);
if (xn == 1 && yn == 1) return bigmul1_single(x, y);
return bigmul1_normal(x, y);
return bigmul1_normal(x, y);
}
/* normal multiplication when x or y is a sparse bignum */

View file

@ -664,7 +664,7 @@ rb_enc_associate_index(VALUE obj, int idx)
{
/* enc_check_capable(obj);*/
if (rb_enc_get_index(obj) == idx)
return obj;
return obj;
if (SPECIAL_CONST_P(obj)) {
rb_raise(rb_eArgError, "cannot set encoding");
}

2
gc.c
View file

@ -1009,7 +1009,7 @@ rb_newobj_from_heap(rb_objspace_t *objspace)
VALUE obj;
if ((ruby_gc_stress && !ruby_disable_gc_stress) || !freelist) {
if (!heaps_increment(objspace) && !garbage_collect(objspace)) {
if (!heaps_increment(objspace) && !garbage_collect(objspace)) {
during_gc = 0;
rb_memerror();
}

2
hash.c
View file

@ -193,7 +193,7 @@ static VALUE
hash_foreach_call(struct hash_foreach_arg *arg)
{
if (st_foreach(RHASH(arg->hash)->ntbl, hash_foreach_iter, (st_data_t)arg)) {
rb_raise(rb_eRuntimeError, "hash modified during iteration");
rb_raise(rb_eRuntimeError, "hash modified during iteration");
}
return Qnil;
}

2
io.c
View file

@ -5648,7 +5648,7 @@ io_reopen(VALUE io, VALUE nfile)
nfile = rb_io_get_io(nfile);
if (rb_safe_level() >= 4 &&
(!OBJ_UNTRUSTED(io) || !OBJ_UNTRUSTED(nfile))) {
(!OBJ_UNTRUSTED(io) || !OBJ_UNTRUSTED(nfile))) {
rb_raise(rb_eSecurityError, "Insecure: can't reopen");
}
GetOpenFile(io, fptr);

10
re.c
View file

@ -113,7 +113,7 @@ rb_memsearch_ss(const unsigned char *xs, long m, const unsigned char *ys, long n
if (m > SIZEOF_VALUE)
rb_bug("!!too long pattern string!!");
/* Prepare hash value */
/* Prepare hash value */
for (hx = *x++, hy = *y++; x < xe; ++x, ++y) {
hx <<= CHAR_BIT;
hy <<= CHAR_BIT;
@ -356,7 +356,7 @@ rb_reg_expr_str(VALUE str, const char *s, long len)
}
else if (c == -1) {
int l = mbclen(p, pend, enc);
rb_str_buf_cat(str, p, l);
rb_str_buf_cat(str, p, l);
p += l;
continue;
}
@ -526,9 +526,9 @@ rb_reg_to_s(VALUE re)
rb_enc_get(re),
OnigDefaultSyntax);
if (r == 0) {
++ptr;
len -= 2;
err = (onig_compile(rp, ptr, ptr + len, NULL, NULL, 0) != 0);
++ptr;
len -= 2;
err = (onig_compile(rp, ptr, ptr + len, NULL, NULL, 0) != 0);
}
onig_free(rp);
}

View file

@ -205,17 +205,17 @@ static int to_ascii(OnigEncoding enc, UChar *s, UChar *end,
while (p < end) {
code = ONIGENC_MBC_TO_CODE(enc, p, end);
if (code >= 0x80) {
if (code > 0xffff && len + 10 <= buf_size) {
sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 24));
sprint_byte((char*)(&(buf[len+4])), (unsigned int)(code >> 16));
sprint_byte((char*)(&(buf[len+6])), (unsigned int)(code >> 8));
sprint_byte((char*)(&(buf[len+8])), (unsigned int)code);
len += 10;
}
else if (len + 6 <= buf_size) {
sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 8));
sprint_byte((char*)(&(buf[len+4])), (unsigned int)code);
len += 6;
if (code > 0xffff && len + 10 <= buf_size) {
sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 24));
sprint_byte((char*)(&(buf[len+4])), (unsigned int)(code >> 16));
sprint_byte((char*)(&(buf[len+6])), (unsigned int)(code >> 8));
sprint_byte((char*)(&(buf[len+8])), (unsigned int)code);
len += 10;
}
else if (len + 6 <= buf_size) {
sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 8));
sprint_byte((char*)(&(buf[len+4])), (unsigned int)code);
len += 6;
}
else {
break;

View file

@ -879,7 +879,7 @@ stack_double(OnigStackType** arg_stk_base, OnigStackType** arg_stk_end,
}\
k++;\
}\
break;\
break;\
}\
}\
}\
@ -920,7 +920,7 @@ stack_double(OnigStackType** arg_stk_base, OnigStackType** arg_stk_end,
}\
k++;\
}\
break;\
break;\
}\
}\
else {\

View file

@ -521,7 +521,7 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct vtm *vtm,
* live without, but it would be a great help to those of
* us that muck around with various message processors.
*/
case 'z': /* time zone offset east of GMT e.g. -0600 */
case 'z': /* time zone offset east of GMT e.g. -0600 */
if (precision < 4) precision = 4;
NEEDS(precision + 1);
if (gmt) {
@ -949,7 +949,7 @@ iso8601wknum(const struct tm *timeptr)
* and that
* timeptr->tm_wday MOD 7 == timeptr->tm_wday
* from which it follows that. . .
*/
*/
jan1day = timeptr->tm_wday - (timeptr->tm_yday % 7);
if (jan1day < 0)
jan1day += 7;

View file

@ -3902,7 +3902,7 @@ rb_str_reverse_bang(VALUE str)
while (s < e) {
c = *s;
*s++ = *e;
*e-- = c;
*e-- = c;
}
}
else {

2
time.c
View file

@ -3554,7 +3554,7 @@ time_strftime(VALUE time, VALUE format)
}
else {
len = rb_strftime_alloc(&buf, RSTRING_PTR(format),
&tobj->vtm, rb_time_unmagnify(tobj->timexv), TIME_UTC_P(tobj));
&tobj->vtm, rb_time_unmagnify(tobj->timexv), TIME_UTC_P(tobj));
}
str = rb_str_new(buf, len);
if (buf != buffer) xfree(buf);

View file

@ -675,7 +675,7 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos,
case UNDEF:
goto undef;
default:
rb_raise(rb_eRuntimeError, "unknown transcoding instruction");
rb_raise(rb_eRuntimeError, "unknown transcoding instruction");
}
continue;

4
util.c
View file

@ -291,7 +291,7 @@ ruby_add_suffix(VALUE str, const char *suffix)
while ((*t = *s) && *s != '.') {
baselen++;
if (*s == '\\' || *s == '/') baselen = 0;
s++; t++;
s++; t++;
}
p = t;
@ -309,7 +309,7 @@ ruby_add_suffix(VALUE str, const char *suffix)
ext[++extlen] = '\0';
}
else if (baselen < 8) {
*p++ = *suffix;
*p++ = *suffix;
}
else if (ext[3] != *suffix) {
ext[3] = *suffix;

View file

@ -784,7 +784,7 @@ rb_alias_variable(ID name1, ID name2)
entry2 = rb_global_entry(name2);
if (!st_lookup(rb_global_tbl, (st_data_t)name1, &data1)) {
entry1 = ALLOC(struct global_entry);
entry1 = ALLOC(struct global_entry);
entry1->id = name1;
st_add_direct(rb_global_tbl, name1, (st_data_t)entry1);
}

View file

@ -154,7 +154,7 @@ rb_add_method_def(VALUE klass, ID mid, rb_method_type_t type, rb_method_definiti
klass = rb_cObject;
}
if (rb_safe_level() >= 4 &&
(klass == rb_cObject || !OBJ_UNTRUSTED(klass))) {
(klass == rb_cObject || !OBJ_UNTRUSTED(klass))) {
rb_raise(rb_eSecurityError, "Insecure: can't define method");
}
if (!FL_TEST(klass, FL_SINGLETON) &&