Commit 36684899 authored by dearblue's avatar dearblue

Clear terminated space

parent 1595e836
......@@ -15,8 +15,8 @@ end
# Requires Android NDK r13 or later.
MRuby::CrossBuild.new('android-arm64-v8a') do |conf|
params = {
:arch => 'arm64-v8a',
params = {
:arch => 'arm64-v8a',
:platform => 'android-24',
:toolchain => :clang,
}
......
......@@ -15,8 +15,8 @@ end
# Requires Android NDK r13 or later.
MRuby::CrossBuild.new('android-armeabi') do |conf|
params = {
:arch => 'armeabi',
params = {
:arch => 'armeabi',
:platform => 'android-24',
:toolchain => :clang,
}
......
......@@ -418,5 +418,5 @@ assert('Array#transpose') do
assert_equal([[1], [2], [3]].transpose, [[1,2,3]])
assert_equal([[1,2], [3,4], [5,6]].transpose, [[1,3,5], [2,4,6]])
assert_raise(TypeError) { [1].transpose }
assert_raise(IndexError) { [[1], [2,3,4]].transpose }
assert_raise(IndexError) { [[1], [2,3,4]].transpose }
end
......@@ -419,7 +419,7 @@ gen_move(codegen_scope *s, uint16_t dst, uint16_t src, int nopeep)
}
else {
struct mrb_insn_data data = mrb_last_insn(s);
switch (data.insn) {
case OP_MOVE:
if (dst == src) return; /* remove useless MOVE */
......@@ -456,7 +456,7 @@ gen_return(codegen_scope *s, uint8_t op, uint16_t src)
}
else {
struct mrb_insn_data data = mrb_last_insn(s);
if (data.insn == OP_MOVE && src == data.a) {
s->pc = s->lastpc;
genop_1(s, op, data.b);
......@@ -764,7 +764,7 @@ lambda_body(codegen_scope *s, node *tree, int blk)
kd = tail && tail->cdr->cdr->car? 1 : 0;
/* block argument? */
ba = tail && tail->cdr->cdr->cdr->car ? 1 : 0;
if (ma > 0x1f || oa > 0x1f || pa > 0x1f || ka > 0x1f) {
codegen_error(s, "too many formal arguments");
}
......@@ -3118,7 +3118,7 @@ generate_code(mrb_state *mrb, parser_state *p, int val)
scope->filename_index = p->current_filename_index;
MRB_TRY(&scope->jmp) {
mrb->jmp = &scope->jmp;
mrb->jmp = &scope->jmp;
/* prepare irep */
codegen(scope, p->tree, val);
proc = mrb_proc_new(mrb, scope->irep);
......
......@@ -219,7 +219,7 @@ mrb_ary_shuffle_bang(mrb_state *mrb, mrb_value ary)
mrb_int j;
mrb_value *ptr = RARRAY_PTR(ary);
mrb_value tmp;
j = mrb_fixnum(mrb_random_mt_rand(mrb, random, mrb_fixnum_value(RARRAY_LEN(ary))));
......
......@@ -231,7 +231,7 @@ ary_expand_capa(mrb_state *mrb, struct RArray *a, mrb_int len)
static void
ary_shrink_capa(mrb_state *mrb, struct RArray *a)
{
mrb_int capa;
if (ARY_EMBED_P(a)) return;
......
......@@ -516,7 +516,7 @@ codedump(mrb_state *mrb, mrb_irep *irep)
#undef OPCODE
}
break;
default:
printf("OP_unknown (0x%x)\n", ins);
break;
......
......@@ -1559,7 +1559,7 @@ mrb_objspace_each_objects(mrb_state *mrb, mrb_each_object_callback *callback, vo
mrb->jmp = &c_jmp;
gc_each_objects(mrb, &mrb->gc, callback, data);
mrb->jmp = prev_jmp;
mrb->gc.iterating = iterating;
mrb->gc.iterating = iterating;
} MRB_CATCH(&c_jmp) {
mrb->gc.iterating = iterating;
mrb->jmp = prev_jmp;
......
......@@ -433,7 +433,7 @@ flo_shift(mrb_state *mrb, mrb_value x, mrb_int width)
val = trunc(val);
#else
if (val > 0){
val = floor(val);
val = floor(val);
} else {
val = ceil(val);
}
......
......@@ -790,7 +790,7 @@ mrb_vm_const_get(mrb_state *mrb, mrb_sym sym)
proc = mrb->c->ci->proc;
while (proc) {
c2 = MRB_PROC_TARGET_CLASS(proc);
if (c2 && iv_get(mrb, c2->iv, sym, &v)) {
if (c2 && iv_get(mrb, c2->iv, sym, &v)) {
return v;
}
proc = proc->upper;
......@@ -988,25 +988,25 @@ struct csym_arg {
struct RClass *c;
mrb_sym sym;
};
static int
csym_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p)
{
struct csym_arg *a = (struct csym_arg*)p;
struct RClass *c = a->c;
if (mrb_type(v) == c->tt && mrb_class_ptr(v) == c) {
a->sym = sym;
return 1; /* stop iteration */
}
return 0;
}
static mrb_sym
find_class_sym(mrb_state *mrb, struct RClass *outer, struct RClass *c)
{
struct csym_arg arg;
if (!outer) return 0;
if (outer == c) return 0;
arg.c = c;
......
......@@ -1818,7 +1818,7 @@ RETRY_TRY_BLOCK:
}
regs[blk_pos] = *blk; /* move block */
if (kd) regs[len + 1] = kdict;
/* copy mandatory and optional arguments */
if (argv0 != argv) {
value_move(&regs[1], argv, argc-mlen); /* m1 + o */
......@@ -2077,7 +2077,7 @@ RETRY_TRY_BLOCK:
break;
case OP_R_BREAK:
if (MRB_PROC_STRICT_P(proc)) goto NORMAL_RETURN;
if (MRB_PROC_ORPHAN_P(proc)) {
if (MRB_PROC_ORPHAN_P(proc)) {
mrb_value exc;
L_BREAK_ERROR:
......
......@@ -55,7 +55,7 @@ MRuby::Toolchain.new(:gcc) do |conf, _params|
@header_search_paths
end
end
def conf.enable_sanitizer(*opts)
fail 'sanitizer already set' if @sanitizer_list
......
......@@ -157,7 +157,7 @@ assert('Kernel#clone', '15.3.1.3.8') do
assert_true a.respond_to?(:test)
assert_false b.respond_to?(:test)
assert_true c.respond_to?(:test)
a.freeze
d = a.clone
assert_true d.frozen?
......
......@@ -454,15 +454,15 @@ assert('multiline comments work correctly') do
=begin
this is a comment with nothing after begin and end
=end
=begin this is a comment
=begin this is a comment
this is a comment with extra after =begin
=end
=begin
this is a comment that has =end with spaces after it
=end
=end
=begin this is a comment
this is a comment that has extra after =begin and =end with spaces after it
=end
=end
line = __LINE__
=begin this is a comment
this is a comment that has extra after =begin and =end with tabs after it
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment