mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix some typos by spell checker
This commit is contained in:
parent
f9b62b5cc0
commit
33f2ff3bab
Notes:
git
2021-04-26 10:08:09 +09:00
24 changed files with 36 additions and 36 deletions
4
cont.c
4
cont.c
|
@ -436,7 +436,7 @@ fiber_pool_allocate_memory(size_t * count, size_t stride)
|
|||
#if defined(MADV_FREE_REUSE)
|
||||
// On Mac MADV_FREE_REUSE is necessary for the task_info api
|
||||
// to keep the accounting accurate as possible when a page is marked as reusable
|
||||
// it can possibly not occuring at first call thus re-iterating if necessary.
|
||||
// it can possibly not occurring at first call thus re-iterating if necessary.
|
||||
while (madvise(base, (*count)*stride, MADV_FREE_REUSE) == -1 && errno == EAGAIN);
|
||||
#endif
|
||||
return base;
|
||||
|
@ -657,7 +657,7 @@ fiber_pool_stack_free(struct fiber_pool_stack * stack)
|
|||
#elif defined(MADV_FREE_REUSABLE)
|
||||
// Acknowledge the kernel down to the task info api we make this
|
||||
// page reusable for future use.
|
||||
// As for MADV_FREE_REUSE below we ensure in the rare occassions the task was not
|
||||
// As for MADV_FREE_REUSE below we ensure in the rare occasions the task was not
|
||||
// completed at the time of the call to re-iterate.
|
||||
while (madvise(base, size, MADV_FREE_REUSABLE) == -1 && errno == EAGAIN);
|
||||
#elif defined(MADV_FREE)
|
||||
|
|
|
@ -46,10 +46,10 @@ RB_DEBUG_COUNTER(cc_not_found_in_ccs) // count for CC lookup success in CCS
|
|||
RB_DEBUG_COUNTER(cc_ent_invalidate) // count for invalidating cc (cc->klass = 0)
|
||||
RB_DEBUG_COUNTER(cc_cme_invalidate) // count for invalidating CME
|
||||
|
||||
RB_DEBUG_COUNTER(cc_invalidate_leaf) // count for invalidating klass if klass has no-sublcasses
|
||||
RB_DEBUG_COUNTER(cc_invalidate_leaf) // count for invalidating klass if klass has no-subclasses
|
||||
RB_DEBUG_COUNTER(cc_invalidate_leaf_ccs) // corresponding CCS
|
||||
RB_DEBUG_COUNTER(cc_invalidate_leaf_callable) // complimented cache (no-subclasses)
|
||||
RB_DEBUG_COUNTER(cc_invalidate_tree) // count for invalidating klass if klass has sublcasses
|
||||
RB_DEBUG_COUNTER(cc_invalidate_tree) // count for invalidating klass if klass has subclasses
|
||||
RB_DEBUG_COUNTER(cc_invalidate_tree_cme) // cme if cme is found in this class or superclasses
|
||||
RB_DEBUG_COUNTER(cc_invalidate_tree_callable) // complimented cache (subclasses)
|
||||
RB_DEBUG_COUNTER(cc_invalidate_negative) // count for invalidating negative cache
|
||||
|
|
|
@ -2127,7 +2127,7 @@ To make "Ractor-safe" C extension, we need to check the following points:
|
|||
(1) Do not share unshareable objects between ractors
|
||||
|
||||
For example, C's global variable can lead sharing an unshareable objects
|
||||
betwee ractors.
|
||||
between ractors.
|
||||
|
||||
VALUE g_var;
|
||||
VALUE set(VALUE self, VALUE v){ return g_var = v; }
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
|
||||
/*
|
||||
* Define the followingsha2_* types to types of the correct length on
|
||||
* the native archtecture. Most BSD systems and Linux define u_intXX_t
|
||||
* the native architecture. Most BSD systems and Linux define u_intXX_t
|
||||
* types. Machines with very recent ANSI C headers, can use the
|
||||
* uintXX_t definintions from inttypes.h by defining SHA2_USE_INTTYPES_H
|
||||
* during compile or in the sha.h header file.
|
||||
|
|
|
@ -6787,7 +6787,7 @@ options(unsigned char *cp)
|
|||
case 'S': /* Shift_JIS input */
|
||||
input_encoding = nkf_enc_from_index(SHIFT_JIS);
|
||||
continue;
|
||||
case 'Z': /* Convert X0208 alphabet to asii */
|
||||
case 'Z': /* Convert X0208 alphabet to ascii */
|
||||
/* alpha_f
|
||||
bit:0 Convert JIS X 0208 Alphabet to ASCII
|
||||
bit:1 Convert Kankaku to one space
|
||||
|
|
|
@ -458,7 +458,7 @@ rb_nkf_guess(VALUE obj, VALUE src)
|
|||
* with this and -x option, nkf can be used as UTF converter.
|
||||
* (In other words, without this and -x option, nkf doesn't save some characters)
|
||||
*
|
||||
* When nkf convert string which related to path, you should use this opion.
|
||||
* When nkf convert string which related to path, you should use this option.
|
||||
*
|
||||
* === --cap-input
|
||||
*
|
||||
|
|
|
@ -223,7 +223,7 @@ module Win32
|
|||
B64_TOKEN_PREFIX = ["NTLMSSP"].pack("m").delete("=\n")
|
||||
|
||||
# Given a connection and a request path, performs authentication as the current user and returns
|
||||
# the response from a GET request. The connnection should be a Net::HTTP object, and it should
|
||||
# the response from a GET request. The connection should be a Net::HTTP object, and it should
|
||||
# have been constructed using the Net::HTTP.Proxy method, but anything that responds to "get" will work.
|
||||
# If a user and domain are given, will authenticate as the given user.
|
||||
# Returns the response received from the get method (usually Net::HTTPResponse)
|
||||
|
|
|
@ -1032,8 +1032,8 @@ module IXMLDOMDocument
|
|||
end
|
||||
|
||||
# VOID save
|
||||
# save the document to a specified desination
|
||||
# VARIANT arg0 --- desination [IN]
|
||||
# save the document to a specified destination
|
||||
# VARIANT arg0 --- destination [IN]
|
||||
def save(arg0)
|
||||
ret = _invoke(64, [arg0], [VT_VARIANT])
|
||||
@lastargs = WIN32OLE::ARGV
|
||||
|
@ -6224,8 +6224,8 @@ class Microsoft_XMLDOM_1_0 # DOMDocument
|
|||
end
|
||||
|
||||
# VOID save
|
||||
# save the document to a specified desination
|
||||
# VARIANT arg0 --- desination [IN]
|
||||
# save the document to a specified destination
|
||||
# VARIANT arg0 --- destination [IN]
|
||||
def save(arg0)
|
||||
ret = @dispatch._invoke(64, [arg0], [VT_VARIANT])
|
||||
@lastargs = WIN32OLE::ARGV
|
||||
|
@ -6831,8 +6831,8 @@ class Microsoft_FreeThreadedXMLDOM_1_0 # DOMFreeThreadedDocument
|
|||
end
|
||||
|
||||
# VOID save
|
||||
# save the document to a specified desination
|
||||
# VARIANT arg0 --- desination [IN]
|
||||
# save the document to a specified destination
|
||||
# VARIANT arg0 --- destination [IN]
|
||||
def save(arg0)
|
||||
ret = @dispatch._invoke(64, [arg0], [VT_VARIANT])
|
||||
@lastargs = WIN32OLE::ARGV
|
||||
|
|
|
@ -56,7 +56,7 @@ static const rb_data_type_t oletype_datatype = {
|
|||
/*
|
||||
* Document-class: WIN32OLE_TYPE
|
||||
*
|
||||
* <code>WIN32OLE_TYPE</code> objects represent OLE type libarary information.
|
||||
* <code>WIN32OLE_TYPE</code> objects represent OLE type library information.
|
||||
*/
|
||||
|
||||
static void
|
||||
|
|
|
@ -371,7 +371,7 @@ check_type_val2variant(VALUE val)
|
|||
* Win32OLE converts Ruby object into OLE variant automatically when
|
||||
* invoking OLE methods. If OLE method requires the argument which is
|
||||
* different from the variant by automatic conversion of Win32OLE, you
|
||||
* can convert the specfied variant type by using WIN32OLE_VARIANT class.
|
||||
* can convert the specified variant type by using WIN32OLE_VARIANT class.
|
||||
*
|
||||
* param = WIN32OLE_VARIANT.new(10, WIN32OLE::VARIANT::VT_R4)
|
||||
* oleobj.method(param)
|
||||
|
|
4
gc.c
4
gc.c
|
@ -3344,7 +3344,7 @@ objspace_each_objects(rb_objspace_t *objspace, each_obj_callback *callback, void
|
|||
* heap. This will be a snapshot of the state of the heap before we
|
||||
* call the callback over each page that exists in this buffer. Thus it
|
||||
* is safe for the callback to allocate objects without possibly entering
|
||||
* an infinte loop. */
|
||||
* an infinite loop. */
|
||||
struct heap_page *page = 0;
|
||||
size_t pages_count = 0;
|
||||
list_for_each(&heap_eden->pages, page, page_node) {
|
||||
|
@ -4033,7 +4033,7 @@ id2ref_obj_tbl(rb_objspace_t *objspace, VALUE objid)
|
|||
* r = ObjectSpace._id2ref(s.object_id) #=> "I am a string"
|
||||
* r == s #=> true
|
||||
*
|
||||
* On multi-ractor mode, if the object is not sharable, it raises
|
||||
* On multi-ractor mode, if the object is not shareable, it raises
|
||||
* RangeError.
|
||||
*/
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* extension libraries. They could be written in C++98.
|
||||
* @brief Defines old #_
|
||||
*
|
||||
* Nobody should ever use these macros any longer. No konwn compilers lack
|
||||
* Nobody should ever use these macros any longer. No known compilers lack
|
||||
* prototypes today. It's 21st century. Just forget them.
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
/** Wraps (or simulates) `__attribute__((cold))` */
|
||||
#if RBIMPL_COMPILER_IS(SunPro)
|
||||
# /* Recent SunPro has __has_attribute, and is borken. */
|
||||
# /* Recent SunPro has __has_attribute, and is broken. */
|
||||
# /* It reports it has attribute cold, reality isn't (warnings issued). */
|
||||
# define RBIMPL_ATTR_COLD() /* void */
|
||||
#elif RBIMPL_HAS_ATTRIBUTE(cold)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* @param y Minor version.
|
||||
* @param z Patchlevel.
|
||||
* @retval true cc >= x.y.z.
|
||||
* @retval false oherwise.
|
||||
* @retval false otherwise.
|
||||
*/
|
||||
#define RBIMPL_COMPILER_SINCE(cc, x, y, z) \
|
||||
(RBIMPL_COMPILER_IS(cc) && \
|
||||
|
@ -48,7 +48,7 @@
|
|||
* @param y Minor version.
|
||||
* @param z Patchlevel.
|
||||
* @retval true cc < x.y.z.
|
||||
* @retval false oherwise.
|
||||
* @retval false otherwise.
|
||||
*/
|
||||
#define RBIMPL_COMPILER_BEFORE(cc, x, y, z) \
|
||||
(RBIMPL_COMPILER_IS(cc) && \
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* Do not expect for instance `__VA_ARGS__` is always available.
|
||||
* We assume C99 for ruby itself but we don't assume languages of
|
||||
* extension libraries. They could be written in C++98.
|
||||
* @brief Core data structures, definitions and manupulations.
|
||||
* @brief Core data structures, definitions and manipulations.
|
||||
*/
|
||||
#include "ruby/internal/core/rarray.h"
|
||||
#include "ruby/internal/core/rbasic.h"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
* Q: Why all the macros defined in this file are function-like macros?
|
||||
*
|
||||
* A: Sigh. This is because of Doxgen. Its `SKIP_FUNCTION_MACROS = YES`
|
||||
* A: Sigh. This is because of Doxygen. Its `SKIP_FUNCTION_MACROS = YES`
|
||||
* configuration setting requests us that if we want it to ignore these
|
||||
* macros, then we have to do two things: (1) let them be defined as
|
||||
* function-like macros, and (2) place them separately in their own line,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Permission is hereby granted, to either redistribute and/or
|
||||
* modify this file, provided that the conditions mentioned in the
|
||||
* file COPYING are met. Consult the file for details.
|
||||
* @brief Internal header to suppres / mandate warnings.
|
||||
* @brief Internal header to suppress / mandate warnings.
|
||||
*/
|
||||
#include "ruby/internal/warning_push.h"
|
||||
#define COMPILER_WARNING_PUSH RBIMPL_WARNING_PUSH()
|
||||
|
|
|
@ -396,7 +396,7 @@ rb_memory_view_parse_item_format(const char *format,
|
|||
ssize_t max_alignment_size = 0;
|
||||
|
||||
const char *p = format;
|
||||
if (*p == '|') { // alginment specifier
|
||||
if (*p == '|') { // alignment specifier
|
||||
alignment = true;
|
||||
++format;
|
||||
++p;
|
||||
|
|
4
ractor.c
4
ractor.c
|
@ -558,7 +558,7 @@ wait_status_str(enum ractor_wait_status wait_status)
|
|||
case wait_taking|wait_yielding: return "taking|yielding";
|
||||
case wait_receiving|wait_taking|wait_yielding: return "receiving|taking|yielding";
|
||||
}
|
||||
rb_bug("unrechable");
|
||||
rb_bug("unreachable");
|
||||
}
|
||||
|
||||
static const char *
|
||||
|
@ -573,7 +573,7 @@ wakeup_status_str(enum ractor_wakeup_status wakeup_status)
|
|||
case wakeup_by_interrupt: return "by_interrupt";
|
||||
case wakeup_by_retry: return "by_retry";
|
||||
}
|
||||
rb_bug("unrechable");
|
||||
rb_bug("unreachable");
|
||||
}
|
||||
#endif // USE_RUBY_DEBUG_LOG
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
# on a moved object.
|
||||
#
|
||||
# Besides frozen objects, there are shareable objects. Class and Module objects are shareable so
|
||||
# the Class/Module definitons are shared between ractors. Ractor objects are also shareable objects.
|
||||
# the Class/Module definitions are shared between ractors. Ractor objects are also shareable objects.
|
||||
# All operations for the shareable mutable objects are thread-safe, so the thread-safety property
|
||||
# will be kept. We can not define mutable shareable objects in Ruby, but C extensions can introduce them.
|
||||
#
|
||||
|
@ -223,7 +223,7 @@
|
|||
#
|
||||
# == Reference
|
||||
#
|
||||
# See {Ractor desgin doc}[rdoc-ref:doc/ractor.md] for more details.
|
||||
# See {Ractor design doc}[rdoc-ref:doc/ractor.md] for more details.
|
||||
#
|
||||
class Ractor
|
||||
#
|
||||
|
@ -457,7 +457,7 @@ class Ractor
|
|||
#
|
||||
# If the block returns a truthy value, the message will be removed from the incoming queue
|
||||
# and returned.
|
||||
# Otherwise, the messsage remains in the incoming queue and the following received
|
||||
# Otherwise, the message remains in the incoming queue and the following received
|
||||
# messages are checked by the given block.
|
||||
#
|
||||
# If there are no messages left in the incoming queue, the method will
|
||||
|
|
|
@ -168,7 +168,7 @@ class TestObjSpace < Test::Unit::TestCase
|
|||
assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
|
||||
begin;
|
||||
require "objspace"
|
||||
# Make sure stoping before the tracepoints are initialized doesn't raise. See [Bug #17020]
|
||||
# Make sure stopping before the tracepoints are initialized doesn't raise. See [Bug #17020]
|
||||
ObjectSpace.trace_object_allocations_stop
|
||||
end;
|
||||
end
|
||||
|
|
|
@ -581,7 +581,7 @@ class TestOpenURI < Test::Unit::TestCase
|
|||
) {|f|
|
||||
assert_equal(1, length.length)
|
||||
assert_equal(nil, length[0])
|
||||
assert(progress.length>1,"maybe test is worng")
|
||||
assert(progress.length>1,"maybe test is wrong")
|
||||
assert(progress.sort == progress,"monotone increasing expected but was\n#{progress.inspect}")
|
||||
assert_equal(content.length, progress[-1])
|
||||
assert_equal(content, f.read)
|
||||
|
|
|
@ -922,7 +922,7 @@ class TestEncodingConverter < Test::Unit::TestCase
|
|||
end
|
||||
newlines.each do |nl|
|
||||
opts = {newline: :universal, nl => true}
|
||||
ec2 = assert_warning(/:newline option preceds/, opts.inspect) do
|
||||
ec2 = assert_warning(/:newline option precedes/, opts.inspect) do
|
||||
Encoding::Converter.new("", "", **opts)
|
||||
end
|
||||
assert_equal(ec1, ec2)
|
||||
|
|
|
@ -2514,7 +2514,7 @@ econv_opts(VALUE opt, int ecflags)
|
|||
break;
|
||||
|
||||
case 3:
|
||||
rb_warning(":newline option preceds other newline options");
|
||||
rb_warning(":newline option precedes other newline options");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue