Merge pull request #4110 from dearblue/fix-typo1

Fix typo
This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-09-08 11:20:11 +09:00
committed by GitHub
17 changed files with 34 additions and 35 deletions
@@ -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,
}
+6 -6
View File
@@ -102,7 +102,7 @@ MRB_API mrb_int mrb_str_index(mrb_state*, mrb_value, const char*, mrb_int, mrb_i
#define mrb_str_index_lit(mrb, str, lit, off) mrb_str_index(mrb, str, lit, mrb_strlen_lit(lit), off);
/*
* Appends self to other. Returns self as a concatnated string.
* Appends self to other. Returns self as a concatenated string.
*
*
* Example:
@@ -126,10 +126,10 @@ MRB_API mrb_int mrb_str_index(mrb_state*, mrb_value, const char*, mrb_int, mrb_i
* str1 = mrb_str_new_lit(mrb, "abc");
* str2 = mrb_str_new_lit(mrb, "def");
*
* // Concatnates str2 to str1.
* // Concatenates str2 to str1.
* mrb_str_concat(mrb, str1, str2);
*
* // Prints new Concatnated Ruby string.
* // Prints new Concatenated Ruby string.
* mrb_p(mrb, str1);
*
* mrb_close(mrb);
@@ -178,10 +178,10 @@ MRB_API void mrb_str_concat(mrb_state*, mrb_value, mrb_value);
* mrb_p(mrb, a);
* mrb_p(mrb, b);
*
* // Concatnates both Ruby strings.
* // Concatenates both Ruby strings.
* c = mrb_str_plus(mrb, a, b);
*
* // Prints new Concatnated Ruby string.
* // Prints new Concatenated Ruby string.
* mrb_p(mrb, c);
*
* mrb_close(mrb);
@@ -193,7 +193,7 @@ MRB_API void mrb_str_concat(mrb_state*, mrb_value, mrb_value);
*
* => "abc" # First string
* => "def" # Second string
* => "abcdef" # First & Second concatnated.
* => "abcdef" # First & Second concatenated.
*
* @param [mrb_state] mrb The current mruby state.
* @param [mrb_value] a First string to concatenate.
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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);
+1 -1
View File
@@ -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))));
+1 -1
View File
@@ -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;
+1 -2
View File
@@ -2254,8 +2254,7 @@ mrb_init_class(mrb_state *mrb)
mrb_define_method(mrb, mod, "const_set", mrb_mod_const_set, MRB_ARGS_REQ(2)); /* 15.2.2.4.23 */
mrb_define_method(mrb, mod, "remove_const", mrb_mod_remove_const, MRB_ARGS_REQ(1)); /* 15.2.2.4.40 */
mrb_define_method(mrb, mod, "const_missing", mrb_mod_const_missing, MRB_ARGS_REQ(1));
mrb_define_method(mrb, mod, "method_defined?", mrb_mod_method_defined, MRB_ARGS_REQ(1)); /* 15.2.2.4
.34 */
mrb_define_method(mrb, mod, "method_defined?", mrb_mod_method_defined, MRB_ARGS_REQ(1)); /* 15.2.2.4.34 */
mrb_define_method(mrb, mod, "define_method", mod_define_method, MRB_ARGS_ARG(1,1));
mrb_define_method(mrb, mod, "===", mrb_mod_eqq, MRB_ARGS_REQ(1));
+1 -1
View File
@@ -516,7 +516,7 @@ codedump(mrb_state *mrb, mrb_irep *irep)
#undef OPCODE
}
break;
default:
printf("OP_unknown (0x%x)\n", ins);
break;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -387,8 +387,8 @@ id:
switch (*m) {
case '!': case '?': case '=': ++m;
default: break;
}
}
}
break;
}
return *m ? FALSE : TRUE;
+5 -5
View File
@@ -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;
+2 -2
View File
@@ -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:
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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?
+3 -3
View File
@@ -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