[DOC] fix some comments

Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
cui fliter 2024-03-05 17:50:47 +08:00 committed by GitHub
parent 8e27c01fbb
commit 226a889dc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 16 additions and 16 deletions

View File

@ -31,7 +31,7 @@ PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer):
# paciasp (it also acts as BTI landing pad, so no need to insert BTI also) # paciasp (it also acts as BTI landing pad, so no need to insert BTI also)
hint #25 hint #25
#elif defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT != 0) #elif defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT != 0)
# For the the case PAC is not enabled but BTI is. # For the case PAC is not enabled but BTI is.
# bti c # bti c
hint #34 hint #34
#endif #endif

2
file.c
View File

@ -7582,7 +7582,7 @@ Init_File(void)
* *
* ==== File::RDONLY * ==== File::RDONLY
* *
* Flag File::RDONLY specifies the the stream should be opened for reading only: * Flag File::RDONLY specifies the stream should be opened for reading only:
* *
* filepath = '/tmp/t.tmp' * filepath = '/tmp/t.tmp'
* f = File.new(filepath, File::RDONLY) * f = File.new(filepath, File::RDONLY)

View File

@ -97,7 +97,7 @@ RBIMPL_ATTR_NONNULL(())
* - Case #11: When signo and PID are both negative, the behaviour of this * - Case #11: When signo and PID are both negative, the behaviour of this
* function depends on how `killpg(3)` works. On Linux, it seems such * function depends on how `killpg(3)` works. On Linux, it seems such
* attempt is strictly prohibited and `Errno::EINVAL` is raised. But on * attempt is strictly prohibited and `Errno::EINVAL` is raised. But on
* macOS, it seems it tries to to send the signal actually to the process * macOS, it seems it tries to send the signal actually to the process
* group. * group.
* *
* @note Above description is in fact different from how `kill(2)` works. * @note Above description is in fact different from how `kill(2)` works.

View File

@ -412,7 +412,7 @@ VALUE rb_utf8_str_new_static(const char *ptr, long len);
/** /**
* Identical to rb_interned_str(), except it takes a Ruby's string instead of * Identical to rb_interned_str(), except it takes a Ruby's string instead of
* C's. It can also be seen as a routine identical to to rb_str_new_shared(), * C's. It can also be seen as a routine identical to rb_str_new_shared(),
* except it returns an infamous "f"string. * except it returns an infamous "f"string.
* *
* @param[in] str An object of ::RString. * @param[in] str An object of ::RString.

View File

@ -292,7 +292,7 @@ EOF
case var_name case var_name
# On windows, it is assumed that mkmf has setup an exports file for the # On windows, it is assumed that mkmf has setup an exports file for the
# extension, so we have to to create one ourselves. # extension, so we have to create one ourselves.
when "DEFFILE" when "DEFFILE"
write_deffile(dest_dir, crate_name) write_deffile(dest_dir, crate_name)
else else

View File

@ -103,7 +103,7 @@ module Gem::Molinillo
# @return [Boolean] where the requirement of the state we're unwinding # @return [Boolean] where the requirement of the state we're unwinding
# to directly caused the conflict. Note: in this case, it is # to directly caused the conflict. Note: in this case, it is
# impossible for the state we're unwinding to to be a parent of # impossible for the state we're unwinding to be a parent of
# any of the other conflicting requirements (or we would have # any of the other conflicting requirements (or we would have
# circularity) # circularity)
def unwinding_to_primary_requirement? def unwinding_to_primary_requirement?

View File

@ -2771,7 +2771,7 @@ class Gem::Resolv
attr_reader :target attr_reader :target
## ##
# The service paramters for the target host. # The service parameters for the target host.
attr_reader :params attr_reader :params

View File

@ -17320,7 +17320,7 @@ parse_assignment_values(pm_parser_t *parser, pm_binding_power_t previous_binding
bool accepts_command_call_inner = false; bool accepts_command_call_inner = false;
// RHS can accept command call iff the value is a call with arguments // RHS can accept command call iff the value is a call with arguments
// but without paranthesis. // but without parenthesis.
if (PM_NODE_TYPE_P(value, PM_CALL_NODE)) { if (PM_NODE_TYPE_P(value, PM_CALL_NODE)) {
pm_call_node_t *call_node = (pm_call_node_t *) value; pm_call_node_t *call_node = (pm_call_node_t *) value;
if ((call_node->arguments != NULL) && (call_node->opening_loc.start == NULL)) { if ((call_node->arguments != NULL) && (call_node->opening_loc.start == NULL)) {

View File

@ -253,7 +253,7 @@ pm_constant_pool_insert(pm_constant_pool_t *pool, const uint8_t *start, size_t l
index = (index + 1) & mask; index = (index + 1) & mask;
} }
// IDs are allocated starting at 1, since the value 0 denotes a non-existant // IDs are allocated starting at 1, since the value 0 denotes a non-existent
// constant. // constant.
uint32_t id = ++pool->size; uint32_t id = ++pool->size;
assert(pool->size < ((uint32_t) (1 << 30))); assert(pool->size < ((uint32_t) (1 << 30)));

View File

@ -62,7 +62,7 @@ typedef enum {
/** The decimal base, indicated by a 0d, 0D, or empty prefix. */ /** The decimal base, indicated by a 0d, 0D, or empty prefix. */
PM_INTEGER_BASE_DECIMAL, PM_INTEGER_BASE_DECIMAL,
/** The hexidecimal base, indicated by a 0x or 0X prefix. */ /** The hexadecimal base, indicated by a 0x or 0X prefix. */
PM_INTEGER_BASE_HEXADECIMAL, PM_INTEGER_BASE_HEXADECIMAL,
/** /**

View File

@ -2292,7 +2292,7 @@ pm_compile_pattern(rb_iseq_t *iseq, pm_scope_node_t *scope_node, const pm_node_t
break; break;
} }
case PM_LOCAL_VARIABLE_TARGET_NODE: { case PM_LOCAL_VARIABLE_TARGET_NODE: {
// Local variables can be targetted by placing identifiers in the place // Local variables can be targeted by placing identifiers in the place
// of a pattern. For example, foo in bar. This results in the value // of a pattern. For example, foo in bar. This results in the value
// being matched being written to that local variable. // being matched being written to that local variable.
pm_local_variable_target_node_t *cast = (pm_local_variable_target_node_t *) node; pm_local_variable_target_node_t *cast = (pm_local_variable_target_node_t *) node;

View File

@ -43,7 +43,7 @@ describe "Invoking a method" do
end end
describe "with optional arguments" do describe "with optional arguments" do
it "uses the optional argument if none is is passed" do it "uses the optional argument if none is passed" do
specs.fooM0O1.should == [1] specs.fooM0O1.should == [1]
end end

View File

@ -63,7 +63,7 @@ describe "UDPSocket#send" do
@msg[1][3].should == "127.0.0.1" @msg[1][3].should == "127.0.0.1"
end end
it "raises EMSGSIZE if data is too too big" do it "raises EMSGSIZE if data is too big" do
@socket = UDPSocket.open @socket = UDPSocket.open
begin begin
-> do -> do

View File

@ -754,7 +754,7 @@ timer_thread_register_waiting(rb_thread_t *th, int fd, enum thread_sched_waiting
case EPERM: case EPERM:
// the fd doesn't support epoll // the fd doesn't support epoll
case EEXIST: case EEXIST:
// the fd is already registerred by another thread // the fd is already registered by another thread
rb_native_mutex_unlock(&timer_th.waiting_lock); rb_native_mutex_unlock(&timer_th.waiting_lock);
return false; return false;
default: default:

View File

@ -1442,7 +1442,7 @@ rb_obj_convert_to_too_complex(VALUE obj, st_table *table)
if (old_ivtbl) { if (old_ivtbl) {
/* We need to modify old_ivtbl to have the too complex shape /* We need to modify old_ivtbl to have the too complex shape
* and hold the table because the xmalloc could trigger a GC * and hold the table because the xmalloc could trigger a GC
* compaction. We want the table to be updated rather than than * compaction. We want the table to be updated rather than
* the original ivptr. */ * the original ivptr. */
#if SHAPE_IN_BASIC_FLAGS #if SHAPE_IN_BASIC_FLAGS
rb_shape_set_shape_id(obj, OBJ_TOO_COMPLEX_SHAPE_ID); rb_shape_set_shape_id(obj, OBJ_TOO_COMPLEX_SHAPE_ID);

View File

@ -995,7 +995,7 @@ fn jump_to_next_insn(
asm: &mut Assembler, asm: &mut Assembler,
ocb: &mut OutlinedCb, ocb: &mut OutlinedCb,
) -> Option<()> { ) -> Option<()> {
// Reset the depth since in current usages we only ever jump to to // Reset the depth since in current usages we only ever jump to
// chain_depth > 0 from the same instruction. // chain_depth > 0 from the same instruction.
let mut reset_depth = asm.ctx; let mut reset_depth = asm.ctx;
reset_depth.reset_chain_depth_and_defer(); reset_depth.reset_chain_depth_and_defer();