summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cont.c4
-rw-r--r--debug_counter.h4
-rw-r--r--doc/extension.rdoc2
-rw-r--r--ext/digest/sha2/sha2.c2
-rw-r--r--ext/nkf/nkf-utf8/nkf.c2
-rw-r--r--ext/nkf/nkf.c2
-rw-r--r--ext/win32/lib/win32/sspi.rb2
-rw-r--r--ext/win32ole/sample/xml.rb12
-rw-r--r--ext/win32ole/win32ole_type.c2
-rw-r--r--ext/win32ole/win32ole_variant.c2
-rw-r--r--gc.c4
-rw-r--r--include/ruby/backward/2/stdarg.h2
-rw-r--r--include/ruby/internal/attr/cold.h2
-rw-r--r--include/ruby/internal/compiler_since.h4
-rw-r--r--include/ruby/internal/core.h2
-rw-r--r--include/ruby/internal/warning_push.h2
-rw-r--r--internal/warnings.h2
-rw-r--r--memory_view.c2
-rw-r--r--ractor.c4
-rw-r--r--ractor.rb6
-rw-r--r--test/objspace/test_objspace.rb2
-rw-r--r--test/open-uri/test_open-uri.rb2
-rw-r--r--test/ruby/test_econv.rb2
-rw-r--r--transcode.c2
24 files changed, 36 insertions, 36 deletions
diff --git a/cont.c b/cont.c
index bdd308569c..35007cac35 100644
--- a/cont.c
+++ b/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)
diff --git a/debug_counter.h b/debug_counter.h
index 3c20821db6..9452f4c737 100644
--- a/debug_counter.h
+++ b/debug_counter.h
@@ -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
diff --git a/doc/extension.rdoc b/doc/extension.rdoc
index c33dea2228..f8e0a1ec3d 100644
--- a/doc/extension.rdoc
+++ b/doc/extension.rdoc
@@ -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; }
diff --git a/ext/digest/sha2/sha2.c b/ext/digest/sha2/sha2.c
index c86eab37a0..f55de33eb3 100644
--- a/ext/digest/sha2/sha2.c
+++ b/ext/digest/sha2/sha2.c
@@ -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.
diff --git a/ext/nkf/nkf-utf8/nkf.c b/ext/nkf/nkf-utf8/nkf.c
index f797252409..08b372ffab 100644
--- a/ext/nkf/nkf-utf8/nkf.c
+++ b/ext/nkf/nkf-utf8/nkf.c
@@ -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
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c
index 37717e4799..76f7648d1b 100644
--- a/ext/nkf/nkf.c
+++ b/ext/nkf/nkf.c
@@ -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
*
diff --git a/ext/win32/lib/win32/sspi.rb b/ext/win32/lib/win32/sspi.rb
index a73819f24e..20205fd4d6 100644
--- a/ext/win32/lib/win32/sspi.rb
+++ b/ext/win32/lib/win32/sspi.rb
@@ -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)
diff --git a/ext/win32ole/sample/xml.rb b/ext/win32ole/sample/xml.rb
index 36c3db32ef..5a239c9336 100644
--- a/ext/win32ole/sample/xml.rb
+++ b/ext/win32ole/sample/xml.rb
@@ -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
diff --git a/ext/win32ole/win32ole_type.c b/ext/win32ole/win32ole_type.c
index fa39bf3696..48dbc9dbde 100644
--- a/ext/win32ole/win32ole_type.c
+++ b/ext/win32ole/win32ole_type.c
@@ -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
diff --git a/ext/win32ole/win32ole_variant.c b/ext/win32ole/win32ole_variant.c
index 93f0636593..5ab29669f6 100644
--- a/ext/win32ole/win32ole_variant.c
+++ b/ext/win32ole/win32ole_variant.c
@@ -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)
diff --git a/gc.c b/gc.c
index fccb2e9b8d..4d78b85543 100644
--- a/gc.c
+++ b/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.
*/
diff --git a/include/ruby/backward/2/stdarg.h b/include/ruby/backward/2/stdarg.h
index c2a9ca1e2f..5c5e1b31ce 100644
--- a/include/ruby/backward/2/stdarg.h
+++ b/include/ruby/backward/2/stdarg.h
@@ -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.
*/
diff --git a/include/ruby/internal/attr/cold.h b/include/ruby/internal/attr/cold.h
index fcee507456..6db57fc9c2 100644
--- a/include/ruby/internal/attr/cold.h
+++ b/include/ruby/internal/attr/cold.h
@@ -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)
diff --git a/include/ruby/internal/compiler_since.h b/include/ruby/internal/compiler_since.h
index 92abb8acc8..b213cfd8b9 100644
--- a/include/ruby/internal/compiler_since.h
+++ b/include/ruby/internal/compiler_since.h
@@ -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) && \
diff --git a/include/ruby/internal/core.h b/include/ruby/internal/core.h
index 53a00a4603..279a697ea1 100644
--- a/include/ruby/internal/core.h
+++ b/include/ruby/internal/core.h
@@ -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"
diff --git a/include/ruby/internal/warning_push.h b/include/ruby/internal/warning_push.h
index b8a21aaeab..ca521290c9 100644
--- a/include/ruby/internal/warning_push.h
+++ b/include/ruby/internal/warning_push.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,
diff --git a/internal/warnings.h b/internal/warnings.h
index 63ded99d04..e9de46eb38 100644
--- a/internal/warnings.h
+++ b/internal/warnings.h
@@ -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()
diff --git a/memory_view.c b/memory_view.c
index a1ab240656..ce2803717b 100644
--- a/memory_view.c
+++ b/memory_view.c
@@ -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;
diff --git a/ractor.c b/ractor.c
index 36898dbf1e..34cec089b8 100644
--- a/ractor.c
+++ b/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
diff --git a/ractor.rb b/ractor.rb
index 2238e090c9..de7c9a93a7 100644
--- a/ractor.rb
+++ b/ractor.rb
@@ -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
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index 97f3d60882..58e086c0a0 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -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
diff --git a/test/open-uri/test_open-uri.rb b/test/open-uri/test_open-uri.rb
index 9a52e7a287..51e8e503a0 100644
--- a/test/open-uri/test_open-uri.rb
+++ b/test/open-uri/test_open-uri.rb
@@ -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)
diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb
index a1ab1c8df6..1aad0de347 100644
--- a/test/ruby/test_econv.rb
+++ b/test/ruby/test_econv.rb
@@ -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)
diff --git a/transcode.c b/transcode.c
index dcb85a532b..505c8177fb 100644
--- a/transcode.c
+++ b/transcode.c
@@ -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;
}
}