Skip to content

Commit

Permalink
[DOC] fix some comments
Browse files Browse the repository at this point in the history
Signed-off-by: cui fliter <[email protected]>
  • Loading branch information
cuishuang authored Mar 5, 2024
1 parent 8e27c01 commit 226a889
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion coroutine/arm64/Context.S
Original file line number Diff line number Diff line change
Expand Up @@ -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)
hint #25
#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
hint #34
#endif
Expand Down
2 changes: 1 addition & 1 deletion file.c
Original file line number Diff line number Diff line change
Expand Up @@ -7582,7 +7582,7 @@ Init_File(void)
*
* ==== 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'
* f = File.new(filepath, File::RDONLY)
Expand Down
2 changes: 1 addition & 1 deletion include/ruby/internal/intern/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ RBIMPL_ATTR_NONNULL(())
* - 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
* 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.
*
* @note Above description is in fact different from how `kill(2)` works.
Expand Down
2 changes: 1 addition & 1 deletion include/ruby/internal/intern/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
* 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.
*
* @param[in] str An object of ::RString.
Expand Down
2 changes: 1 addition & 1 deletion lib/rubygems/ext/cargo_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def maybe_resolve_ldflag_variable(input_arg, dest_dir, crate_name)

case var_name
# 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"
write_deffile(dest_dir, crate_name)
else
Expand Down
2 changes: 1 addition & 1 deletion lib/rubygems/vendor/molinillo/lib/molinillo/resolution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def reversed_requirement_tree_index

# @return [Boolean] where the requirement of the state we're unwinding
# 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
# circularity)
def unwinding_to_primary_requirement?
Expand Down
2 changes: 1 addition & 1 deletion lib/rubygems/vendor/resolv/lib/resolv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2771,7 +2771,7 @@ def initialize(priority, target, params = [])
attr_reader :target

##
# The service paramters for the target host.
# The service parameters for the target host.

attr_reader :params

Expand Down
2 changes: 1 addition & 1 deletion prism/prism.c
Original file line number Diff line number Diff line change
Expand Up @@ -17320,7 +17320,7 @@ parse_assignment_values(pm_parser_t *parser, pm_binding_power_t previous_binding
bool accepts_command_call_inner = false;

// 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)) {
pm_call_node_t *call_node = (pm_call_node_t *) value;
if ((call_node->arguments != NULL) && (call_node->opening_loc.start == NULL)) {
Expand Down
2 changes: 1 addition & 1 deletion prism/util/pm_constant_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ pm_constant_pool_insert(pm_constant_pool_t *pool, const uint8_t *start, size_t l
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.
uint32_t id = ++pool->size;
assert(pool->size < ((uint32_t) (1 << 30)));
Expand Down
2 changes: 1 addition & 1 deletion prism/util/pm_integer.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ typedef enum {
/** The decimal base, indicated by a 0d, 0D, or empty prefix. */
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,

/**
Expand Down
2 changes: 1 addition & 1 deletion prism_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -2292,7 +2292,7 @@ pm_compile_pattern(rb_iseq_t *iseq, pm_scope_node_t *scope_node, const pm_node_t
break;
}
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
// being matched being written to that local variable.
pm_local_variable_target_node_t *cast = (pm_local_variable_target_node_t *) node;
Expand Down
2 changes: 1 addition & 1 deletion spec/ruby/language/send_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
end

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]
end

Expand Down
2 changes: 1 addition & 1 deletion spec/ruby/library/socket/udpsocket/send_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
@msg[1][3].should == "127.0.0.1"
end

it "raises EMSGSIZE if data is too too big" do
it "raises EMSGSIZE if data is too big" do
@socket = UDPSocket.open
begin
-> do
Expand Down
2 changes: 1 addition & 1 deletion thread_pthread_mn.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ timer_thread_register_waiting(rb_thread_t *th, int fd, enum thread_sched_waiting
case EPERM:
// the fd doesn't support epoll
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);
return false;
default:
Expand Down
2 changes: 1 addition & 1 deletion variable.c
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ rb_obj_convert_to_too_complex(VALUE obj, st_table *table)
if (old_ivtbl) {
/* We need to modify old_ivtbl to have the too complex shape
* 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. */
#if SHAPE_IN_BASIC_FLAGS
rb_shape_set_shape_id(obj, OBJ_TOO_COMPLEX_SHAPE_ID);
Expand Down
2 changes: 1 addition & 1 deletion yjit/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ fn jump_to_next_insn(
asm: &mut Assembler,
ocb: &mut OutlinedCb,
) -> 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.
let mut reset_depth = asm.ctx;
reset_depth.reset_chain_depth_and_defer();
Expand Down

0 comments on commit 226a889

Please sign in to comment.