[DOC] Fix grammar: "is same as" -> "is the same as"

This commit is contained in:
Marcus Stollsteimer 2021-01-05 15:13:53 +01:00
Родитель 3d43944725
Коммит 3108ad7bf3
20 изменённых файлов: 33 добавлений и 33 удалений

Просмотреть файл

@ -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)))

2
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);
}

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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 ::

Просмотреть файл

@ -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.

2
eval.c
Просмотреть файл

@ -1062,7 +1062,7 @@ rb_vrescue2(VALUE (* b_proc) (VALUE), VALUE data1,
*
* Equivalent to <code>begin .. rescue .. end</code>.
*
* It is same as
* It is the same as
* \code{cpp}
* rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError, (VALUE)0);
* \endcode

Просмотреть файл

@ -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

Просмотреть файл

@ -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)

Просмотреть файл

@ -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.

Просмотреть файл

@ -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)

2
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.

2
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

Просмотреть файл

@ -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

6
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]
*

16
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

2
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.
*
* /(?<foo>.)(?<bar>.)(?<baz>.)/.match("hoge").names
* #=> ["foo", "bar", "baz"]

Просмотреть файл

@ -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)

Просмотреть файл

@ -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'

Просмотреть файл

@ -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.
*