Fix spelling (#7389)

This commit is contained in:
John Bampton 2023-02-28 03:56:06 +10:00 committed by GitHub
parent 526111290b
commit 2f7270c681
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2023-02-27 17:56:31 +00:00
Merged-By: k0kubun <takashikkbn@gmail.com>
9 changed files with 9 additions and 9 deletions

2
ast.rb
View File

@ -53,7 +53,7 @@ module RubyVM::AbstractSyntaxTree
# # (ERROR@1:7-1:11), # # (ERROR@1:7-1:11),
# # (LASGN@1:12-1:15 :y (LIT@1:14-1:15 2))] # # (LASGN@1:12-1:15 :y (LIT@1:14-1:15 2))]
# #
# Note that parsing continues even after the errored expresion. # Note that parsing continues even after the errored expression.
# #
def self.parse string, keep_script_lines: false, error_tolerant: false, keep_tokens: false def self.parse string, keep_script_lines: false, error_tolerant: false, keep_tokens: false
Primitive.ast_s_parse string, keep_script_lines, error_tolerant, keep_tokens Primitive.ast_s_parse string, keep_script_lines, error_tolerant, keep_tokens

View File

@ -4847,7 +4847,7 @@ when_vals(rb_iseq_t *iseq, LINK_ANCHOR *const cond_seq, const NODE *vals,
if (!COMPILE(cond_seq, "when cond", val)) return -1; if (!COMPILE(cond_seq, "when cond", val)) return -1;
} }
// Emit patern === target // Emit pattern === target
ADD_INSN1(cond_seq, vals, topn, INT2FIX(1)); ADD_INSN1(cond_seq, vals, topn, INT2FIX(1));
ADD_CALL(cond_seq, vals, idEqq, INT2FIX(1)); ADD_CALL(cond_seq, vals, idEqq, INT2FIX(1));
ADD_INSNL(cond_seq, val, branchif, l1); ADD_INSNL(cond_seq, val, branchif, l1);

View File

@ -450,7 +450,7 @@ check_filter(const char *str, const struct debug_log_filter *filter, bool *state
// (func_name or file_name) contains baz or boo // (func_name or file_name) contains baz or boo
// //
// RUBY_DEBUG_LOG_FILTER=foo,bar,-baz,-boo // RUBY_DEBUG_LOG_FILTER=foo,bar,-baz,-boo
// retunrs true if // returns true if
// (func_name or file_name) contains foo or bar // (func_name or file_name) contains foo or bar
// or // or
// (func_name or file_name) doesn't contain baz and // (func_name or file_name) doesn't contain baz and

2
gc.c
View File

@ -9792,7 +9792,7 @@ gc_exit(rb_objspace_t *objspace, enum gc_enter_event event, unsigned int *lock_l
{ {
GC_ASSERT(during_gc != 0); GC_ASSERT(during_gc != 0);
gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_EXIT, 0); /* TODO: which parameter should be passsed? */ gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_EXIT, 0); /* TODO: which parameter should be passed? */
gc_record(objspace, 1, gc_enter_event_cstr(event)); gc_record(objspace, 1, gc_enter_event_cstr(event));
RUBY_DEBUG_LOG("%s (%s)", gc_enter_event_cstr(event), gc_current_status(objspace)); RUBY_DEBUG_LOG("%s (%s)", gc_enter_event_cstr(event), gc_current_status(objspace));
gc_report(1, objspace, "gc_exit: %s [%s]\n", gc_enter_event_cstr(event), gc_current_status(objspace)); gc_report(1, objspace, "gc_exit: %s [%s]\n", gc_enter_event_cstr(event), gc_current_status(objspace));

View File

@ -783,7 +783,7 @@ rb_io_buffer_inspect(VALUE self)
VALUE result = rb_io_buffer_to_s(self); VALUE result = rb_io_buffer_to_s(self);
if (io_buffer_validate(data)) { if (io_buffer_validate(data)) {
// Limit the maximum size genearted by inspect. // Limit the maximum size generated by inspect.
if (data->size <= 256) { if (data->size <= 256) {
io_buffer_hexdump(result, 16, data->base, data->size, 0); io_buffer_hexdump(result, 16, data->base, data->size, 0);
} }

2
iseq.c
View File

@ -3805,7 +3805,7 @@ succ_index_lookup(const struct succ_index_table *sd, int x)
* call-seq: * call-seq:
* iseq.script_lines -> array or nil * iseq.script_lines -> array or nil
* *
* It returns recorded script lines if it is availalble. * It returns recorded script lines if it is available.
* The script lines are not limited to the iseq range, but * The script lines are not limited to the iseq range, but
* are entire lines of the source file. * are entire lines of the source file.
* *

View File

@ -3237,7 +3237,7 @@ rb_opts_exception_p(VALUE opts, int default_value)
* Integer(-1) # => -1 * Integer(-1) # => -1
* *
* With floating-point argument +object+ given, * With floating-point argument +object+ given,
* returns +object+ truncated to an intger: * returns +object+ truncated to an integer:
* *
* Integer(1.9) # => 1 # Rounds toward zero. * Integer(1.9) # => 1 # Rounds toward zero.
* Integer(-1.9) # => -1 # Rounds toward zero. * Integer(-1.9) # => -1 # Rounds toward zero.

View File

@ -19,7 +19,7 @@
# # fails immediately with # # fails immediately with
# # ArgumentError (can not isolate a Proc because it accesses outer variables (a).) # # ArgumentError (can not isolate a Proc because it accesses outer variables (a).)
# #
# The object must be explicity shared: # The object must be explicitly shared:
# a = 1 # a = 1
# r = Ractor.new(a) { |a1| puts "I am in Ractor! a=#{a1}"} # r = Ractor.new(a) { |a1| puts "I am in Ractor! a=#{a1}"}
# #

View File

@ -333,7 +333,7 @@ rb_str_update_shared_ary(VALUE str, VALUE old_root, VALUE new_root)
return; return;
} }
// if the root string isn't embedded, we don't need to touch the ponter. // if the root string isn't embedded, we don't need to touch the pointer.
// it already points to the shame shared buffer // it already points to the shame shared buffer
if (!STR_EMBED_P(new_root)) { if (!STR_EMBED_P(new_root)) {
return; return;