From 3108ad7bf3dcae52054a1c29b86246cdb470000b Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 5 Jan 2021 15:13:53 +0100 Subject: [PATCH] [DOC] Fix grammar: "is same as" -> "is the same as" --- bignum.c | 2 +- cont.c | 2 +- doc/NEWS-2.1.0 | 2 +- doc/NEWS-2.2.0 | 2 +- doc/extension.rdoc | 4 ++-- doc/ractor.md | 2 +- eval.c | 2 +- ext/pty/pty.c | 2 +- ext/socket/ipsocket.c | 6 +++--- ext/socket/socket.c | 2 +- ext/win32/lib/win32/registry.rb | 4 ++-- gc.c | 2 +- io.c | 2 +- man/ruby.1 | 2 +- math.c | 6 +++--- pack.rb | 16 ++++++++-------- re.c | 2 +- timev.rb | 2 +- tool/update-deps | 2 +- vm_eval.c | 2 +- 20 files changed, 33 insertions(+), 33 deletions(-) diff --git a/bignum.c b/bignum.c index 7c55366ecb..192e384d92 100644 --- a/bignum.c +++ b/bignum.c @@ -75,7 +75,7 @@ STATIC_ASSERT(sizeof_long_and_sizeof_bdigit, SIZEOF_BDIGIT % SIZEOF_LONG == 0); #else # define HOST_BIGENDIAN_P 0 #endif -/* (!LSHIFTABLE(d, n) ? 0 : (n)) is same as n but suppress a warning, C4293, by Visual Studio. */ +/* (!LSHIFTABLE(d, n) ? 0 : (n)) is the same as n but suppress a warning, C4293, by Visual Studio. */ #define LSHIFTABLE(d, n) ((n) < sizeof(d) * CHAR_BIT) #define LSHIFTX(d, n) (!LSHIFTABLE(d, n) ? 0 : ((d) << (!LSHIFTABLE(d, n) ? 0 : (n)))) #define CLEAR_LOWBITS(d, numbits) ((d) & LSHIFTX(~((d)*0), (numbits))) diff --git a/cont.c b/cont.c index 524068b46e..cfd4eca550 100644 --- a/cont.c +++ b/cont.c @@ -2226,7 +2226,7 @@ fiber_switch(rb_fiber_t *fiber, int argc, const VALUE *argv, int kw_splat, VALUE if (th->ec->fiber_ptr == fiber) { /* ignore fiber context switch - * because destination fiber is same as current fiber + * because destination fiber is the same as current fiber */ return make_passing_arg(argc, argv); } diff --git a/doc/NEWS-2.1.0 b/doc/NEWS-2.1.0 index 5d4152b8dc..26f2374e94 100644 --- a/doc/NEWS-2.1.0 +++ b/doc/NEWS-2.1.0 @@ -155,7 +155,7 @@ with all sufficient information, see the ChangeLog file. Foo#foo private. * Kernel#untrusted?, untrust, and trust - * These methods are deprecated and their behavior is same as tainted?, + * These methods are deprecated and their behavior is the same as tainted?, taint, and untaint, respectively. If $VERBOSE is true, they show warnings. * Module#ancestors diff --git a/doc/NEWS-2.2.0 b/doc/NEWS-2.2.0 index 98e252ec77..8b2bd0ba0a 100644 --- a/doc/NEWS-2.2.0 +++ b/doc/NEWS-2.2.0 @@ -318,7 +318,7 @@ with all sufficient information, see the ChangeLog file. * rb_sym2str() added. This is almost same as `rb_id2str(SYM2ID(sym))` but not pinning a dynamic symbol. -* rb_str_cat_cstr() added. This is same as `rb_str_cat2()`. +* rb_str_cat_cstr() added. This is the same as `rb_str_cat2()`. * `rb_str_substr()` and `rb_str_subseq()` will share middle of a string, but not only the end of a string, in the future. Therefore, result diff --git a/doc/extension.rdoc b/doc/extension.rdoc index 71a03cbf52..a4996920f9 100644 --- a/doc/extension.rdoc +++ b/doc/extension.rdoc @@ -1868,13 +1868,13 @@ NORETURN_STYLE_NEW :: HAVE_RB_DEFINE_ALLOC_FUNC :: Means that function rb_define_alloc_func() is provided, that means the - allocation framework is used. This is same as the result of + allocation framework is used. This is the same as the result of have_func("rb_define_alloc_func", "ruby.h"). HAVE_RB_REG_NEW_STR :: Means that function rb_reg_new_str() is provided, that creates Regexp - object from String object. This is same as the result of + object from String object. This is the same as the result of have_func("rb_reg_new_str", "ruby.h"). HAVE_RB_IO_T :: diff --git a/doc/ractor.md b/doc/ractor.md index 235d58463b..8cfa9fe46a 100644 --- a/doc/ractor.md +++ b/doc/ractor.md @@ -192,7 +192,7 @@ For message sending and receiving, there are two types APIs: push type and pull * (1-1) send/receive (push type) * `Ractor#send(obj)` (`Ractor#<<(obj)` is an aliases) send a message to the Ractor's incoming port. Incoming port is connected to the infinite size incoming queue so `Ractor#send` will never block. * `Ractor.receive` dequeue a message from its own incoming queue. If the incoming queue is empty, `Ractor.receive` calling will block. - * `Ractor.receive_if{|msg| filter_expr }` is variant of `Ractor.receive`. `receive_if` only receives a message which `filter_expr` is true (So `Ractor.receive` is same as `Ractor.receive_if{ true }`. + * `Ractor.receive_if{|msg| filter_expr }` is variant of `Ractor.receive`. `receive_if` only receives a message which `filter_expr` is true (So `Ractor.receive` is the same as `Ractor.receive_if{ true }`. * (1-2) yield/take (pull type) * `Ractor.yield(obj)` send an message to a Ractor which are calling `Ractor#take` via outgoing port . If no Ractors are waiting for it, the `Ractor.yield(obj)` will block. If multiple Ractors are waiting for `Ractor.yield(obj)`, only one Ractor can receive the message. * `Ractor#take` receives a message which is waiting by `Ractor.yield(obj)` method from the specified Ractor. If the Ractor does not call `Ractor.yield` yet, the `Ractor#take` call will block. diff --git a/eval.c b/eval.c index 55ac8b4eac..be6a6b4dfd 100644 --- a/eval.c +++ b/eval.c @@ -1062,7 +1062,7 @@ rb_vrescue2(VALUE (* b_proc) (VALUE), VALUE data1, * * Equivalent to begin .. rescue .. end. * - * It is same as + * It is the same as * \code{cpp} * rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError, (VALUE)0); * \endcode diff --git a/ext/pty/pty.c b/ext/pty/pty.c index e53871ede5..d927adc560 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -271,7 +271,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg, int flags = O_RDWR|O_NOCTTY; # if defined(O_CLOEXEC) /* glibc posix_openpt() in GNU/Linux calls open("/dev/ptmx", flags) internally. - * So version dependency on GNU/Linux is same as O_CLOEXEC with open(). + * So version dependency on GNU/Linux is the same as O_CLOEXEC with open(). * O_CLOEXEC is available since Linux 2.6.23. Linux 2.6.18 silently ignore it. */ flags |= O_CLOEXEC; # endif diff --git a/ext/socket/ipsocket.c b/ext/socket/ipsocket.c index 72fea789a5..b5cdc60080 100644 --- a/ext/socket/ipsocket.c +++ b/ext/socket/ipsocket.c @@ -258,7 +258,7 @@ ip_inspect(VALUE sock) * If +reverse_lookup+ is +true+ or +:hostname+, * hostname is obtained from numeric_address using reverse lookup. * Or if it is +false+, or +:numeric+, - * hostname is same as numeric_address. + * hostname is the same as numeric_address. * Or if it is +nil+ or omitted, obeys to +ipsocket.do_not_reverse_lookup+. * See +Socket.getaddrinfo+ also. * @@ -299,7 +299,7 @@ ip_addr(int argc, VALUE *argv, VALUE sock) * If +reverse_lookup+ is +true+ or +:hostname+, * hostname is obtained from numeric_address using reverse lookup. * Or if it is +false+, or +:numeric+, - * hostname is same as numeric_address. + * hostname is the same as numeric_address. * Or if it is +nil+ or omitted, obeys to +ipsocket.do_not_reverse_lookup+. * See +Socket.getaddrinfo+ also. * @@ -341,7 +341,7 @@ ip_peeraddr(int argc, VALUE *argv, VALUE sock) * * _flags_ should be a bitwise OR of Socket::MSG_* constants. * - * ipaddr is same as IPSocket#{peeraddr,addr}. + * ipaddr is the same as IPSocket#{peeraddr,addr}. * * u1 = UDPSocket.new * u1.bind("127.0.0.1", 4913) diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 3d8c65032c..5b6f4ab755 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -1154,7 +1154,7 @@ sock_s_getservbyport(int argc, VALUE *argv, VALUE _) * be one of below. If _reverse_lookup_ is omitted, the default value is +nil+. * * +true+, +:hostname+: hostname is obtained from numeric address using reverse lookup, which may take a time. - * +false+, +:numeric+: hostname is same as numeric address. + * +false+, +:numeric+: hostname is the same as numeric address. * +nil+: obey to the current +do_not_reverse_lookup+ flag. * * If Addrinfo object is preferred, use Addrinfo.getaddrinfo. diff --git a/ext/win32/lib/win32/registry.rb b/ext/win32/lib/win32/registry.rb index ffc2979179..b5b99ff684 100644 --- a/ext/win32/lib/win32/registry.rb +++ b/ext/win32/lib/win32/registry.rb @@ -667,14 +667,14 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr # # Read a registry value named name and return its value data. - # The class of value is same as #read method returns. + # The class of the value is the same as the #read method returns. # # If the value type is REG_EXPAND_SZ, returns value data whose environment # variables are replaced. # If the value type is neither REG_SZ, REG_MULTI_SZ, REG_DWORD, # REG_DWORD_BIG_ENDIAN, nor REG_QWORD, TypeError is raised. # - # The meaning of rtype is same as #read method. + # The meaning of rtype is the same as for the #read method. # def [](name, *rtype) type, data = read(name, *rtype) diff --git a/gc.c b/gc.c index ad2406c98b..c7220e564b 100644 --- a/gc.c +++ b/gc.c @@ -3275,7 +3275,7 @@ incremental_enable(VALUE _) * This means that you can not walk through all Ruby object page * including freed object page. * - * Note: On this implementation, 'stride' is same as sizeof(RVALUE). + * Note: On this implementation, 'stride' is the same as sizeof(RVALUE). * However, there are possibilities to pass variable values with * 'stride' with some reasons. You must use stride instead of * use some constant value in the iteration. diff --git a/io.c b/io.c index 48592ac51a..516673989a 100644 --- a/io.c +++ b/io.c @@ -10179,7 +10179,7 @@ rb_io_fcntl(int argc, VALUE *argv, VALUE io) * Arguments for the function can follow _num_. They must be either * +String+ objects or +Integer+ objects. A +String+ object is passed * as a pointer to the byte sequence. An +Integer+ object is passed - * as an integer whose bit size is same as a pointer. + * as an integer whose bit size is the same as a pointer. * Up to nine parameters may be passed. * * The function identified by _num_ is system diff --git a/man/ruby.1 b/man/ruby.1 index 9f0ae05ee9..3decbc8378 100644 --- a/man/ruby.1 +++ b/man/ruby.1 @@ -257,7 +257,7 @@ Verbose mode is "verbose". It sets the .Li "$VERBOSE" to true. .Fl W Ns -2 is same as +2 is the same as .Fl w . .El diff --git a/math.c b/math.c index f64ad93c06..470979c424 100644 --- a/math.c +++ b/math.c @@ -809,7 +809,7 @@ math_erfc(VALUE unused_obj, VALUE x) * * Calculates the gamma function of x. * - * Note that gamma(n) is same as fact(n-1) for integer n > 0. + * Note that gamma(n) is the same as fact(n-1) for integer n > 0. * However gamma(n) returns float and can be an approximation. * * def fact(n) (1..n).inject(1) {|r,i| r*i } end @@ -900,9 +900,9 @@ math_gamma(VALUE unused_obj, VALUE x) * * Calculates the logarithmic gamma of +x+ and the sign of gamma of +x+. * - * Math.lgamma(x) is same as + * Math.lgamma(x) is the same as * [Math.log(Math.gamma(x).abs), Math.gamma(x) < 0 ? -1 : 1] - * but avoid overflow by Math.gamma(x) for large x. + * but avoids overflow by Math.gamma(x) for large x. * * Math.lgamma(0) #=> [Infinity, 1] * diff --git a/pack.rb b/pack.rb index a4723861d5..019fa80be4 100644 --- a/pack.rb +++ b/pack.rb @@ -77,14 +77,14 @@ class Array # S> s> S!> s!> | Integer | same as the directives without ">" except # L> l> L!> l!> | | big endian # I!> i!> | | (available since Ruby 1.9.3) - # Q> q> Q!> q!> | | "S>" is same as "n" - # J> j> J!> j!> | | "L>" is same as "N" + # Q> q> Q!> q!> | | "S>" is the same as "n" + # J> j> J!> j!> | | "L>" is the same as "N" # | | # S< s< S!< s!< | Integer | same as the directives without "<" except # L< l< L!< l!< | | little endian # I!< i!< | | (available since Ruby 1.9.3) - # Q< q< Q!< q!< | | "S<" is same as "v" - # J< j< J!< j!< | | "L<" is same as "V" + # Q< q< Q!< q!< | | "S<" is the same as "v" + # J< j< J!< j!< | | "L<" is the same as "V" # | | # n | Integer | 16-bit unsigned, network (big-endian) byte order # N | Integer | 32-bit unsigned, network (big-endian) byte order @@ -197,14 +197,14 @@ class String # S> s> S!> s!> | Integer | same as the directives without ">" except # L> l> L!> l!> | | big endian # I!> i!> | | - # Q> q> Q!> q!> | | "S>" is same as "n" - # J> j> J!> j!> | | "L>" is same as "N" + # Q> q> Q!> q!> | | "S>" is the same as "n" + # J> j> J!> j!> | | "L>" is the same as "N" # | | # S< s< S!< s!< | Integer | same as the directives without "<" except # L< l< L!< l!< | | little endian # I!< i!< | | - # Q< q< Q!< q!< | | "S<" is same as "v" - # J< j< J!< j!< | | "L<" is same as "V" + # Q< q< Q!< q!< | | "S<" is the same as "v" + # J< j< J!< j!< | | "L<" is the same as "V" # | | # n | Integer | 16-bit unsigned, network (big-endian) byte order # N | Integer | 32-bit unsigned, network (big-endian) byte order diff --git a/re.c b/re.c index a56b483513..9964e292fd 100644 --- a/re.c +++ b/re.c @@ -1113,7 +1113,7 @@ match_regexp(VALUE match) * mtch.names -> [name1, name2, ...] * * Returns a list of names of captures as an array of strings. - * It is same as mtch.regexp.names. + * This is the same as mtch.regexp.names. * * /(?.)(?.)(?.)/.match("hoge").names * #=> ["foo", "bar", "baz"] diff --git a/timev.rb b/timev.rb index 2083e3106d..37cefafd42 100644 --- a/timev.rb +++ b/timev.rb @@ -3,7 +3,7 @@ # Time.now -> time # # Creates a new Time object for the current time. -# This is same as Time.new without arguments. +# This is the same as Time.new without arguments. # # Time.now #=> 2009-06-24 12:39:54 +0900 def Time.now(in: nil) diff --git a/tool/update-deps b/tool/update-deps index c59debee77..12ae0f6f89 100755 --- a/tool/update-deps +++ b/tool/update-deps @@ -20,7 +20,7 @@ # Other usages: # * Fix makefiles using previously detected dependency problems # Ex. ruby tool/update-deps --actual-fix [file] -# "ruby tool/update-deps --fix" is same as "ruby tool/update-deps | ruby tool/update-deps --actual-fix". +# "ruby tool/update-deps --fix" is the same as "ruby tool/update-deps | ruby tool/update-deps --actual-fix". require 'optparse' require 'stringio' diff --git a/vm_eval.c b/vm_eval.c index 94f3baceab..f9e7356c30 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -1704,7 +1704,7 @@ eval_string_wrap_protect(VALUE data) /** * Evaluates the given string under a module binding in an isolated binding. - * This is same as the binding for loaded libraries on "load('foo', true)". + * This is the same as the binding for loaded libraries on "load('foo', true)". * * __FILE__ will be "(eval)", and __LINE__ starts from 1 in the evaluation. *