mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c30e32d075
commit
b9e0294eda
26 changed files with 71 additions and 71 deletions
|
@ -120,7 +120,7 @@ Fri Oct 30 17:01:46 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|||
* vm_eval.c (vm_call0, vm_call_super, rb_f_send, rb_f_public_send):
|
||||
fixed call_type. [ruby-dev:39581]
|
||||
|
||||
* vm_eval.c (rb_search_method_emtry, rb_method_call_status): spli
|
||||
* vm_eval.c (rb_search_method_entry, rb_method_call_status): split
|
||||
from rb_call0().
|
||||
|
||||
* vm_eval.c (rb_check_funcall): get rid of raising exceptions and
|
||||
|
@ -143,7 +143,7 @@ Fri Oct 30 13:13:16 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
|||
Fri Oct 30 12:59:20 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* thread.c (rb_thread_blocking_region): standard C doesn't accept
|
||||
preprosessing directive within macro expansion.
|
||||
preprocessing directive within macro expansion.
|
||||
|
||||
Fri Oct 30 10:55:36 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
|
@ -1094,7 +1094,7 @@ Mon Oct 5 00:09:57 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
|||
|
||||
* vm_method.c (rb_method_boundp): returns exceptional value 2 for
|
||||
not-implemented methods when called from #respond_to? (specifies
|
||||
by new contant NOEX_RESPONDS).
|
||||
by new constant NOEX_RESPONDS).
|
||||
|
||||
* method.h (enum): new constant NOEX_RESPONDS added.
|
||||
|
||||
|
|
2
class.c
2
class.c
|
@ -1035,7 +1035,7 @@ rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj)
|
|||
* <dd>
|
||||
* This form takes two parameters: self and args.
|
||||
* \a self is the receiver. \a args is an Array object which
|
||||
* containts the arguments.
|
||||
* contains the arguments.
|
||||
*
|
||||
* \code
|
||||
* static VALUE my_method(VALUE self, VALUE args);
|
||||
|
|
24
compile.c
24
compile.c
|
@ -254,12 +254,12 @@ PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
|
|||
(debug_compile("== " desc "\n", \
|
||||
iseq_compile_each(iseq, anchor, node, 0)))
|
||||
|
||||
/* compile node, this node's value will be poped */
|
||||
/* compile node, this node's value will be popped */
|
||||
#define COMPILE_POPED(anchor, desc, node) \
|
||||
(debug_compile("== " desc "\n", \
|
||||
iseq_compile_each(iseq, anchor, node, 1)))
|
||||
|
||||
/* compile node, which is poped when 'poped' is true */
|
||||
/* compile node, which is popped when 'poped' is true */
|
||||
#define COMPILE_(anchor, desc, node, poped) \
|
||||
(debug_compile("== " desc "\n", \
|
||||
iseq_compile_each(iseq, anchor, node, poped)))
|
||||
|
@ -1055,7 +1055,7 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
|
|||
}
|
||||
|
||||
/*
|
||||
* new argument infromation:
|
||||
* new argument information:
|
||||
* NODE_ARGS [m: int, o: NODE_OPT_ARG, ->]
|
||||
* NODE_ARGS_AUX [r: ID, b: ID, ->]
|
||||
* NODE_ARGS_AUX [Pst: id, Plen: int, init: NODE*]
|
||||
|
@ -2211,12 +2211,12 @@ compile_branch_condition(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * cond,
|
|||
case NODE_LIT: /* NODE_LIT is always not true */
|
||||
case NODE_TRUE:
|
||||
case NODE_STR:
|
||||
/* printf("useless conditon eliminate (%s)\n", ruby_node_name(nd_type(cond))); */
|
||||
/* printf("useless condition eliminate (%s)\n", ruby_node_name(nd_type(cond))); */
|
||||
ADD_INSNL(ret, nd_line(cond), jump, then_label);
|
||||
break;
|
||||
case NODE_FALSE:
|
||||
case NODE_NIL:
|
||||
/* printf("useless conditon eliminate (%s)\n", ruby_node_name(nd_type(cond))); */
|
||||
/* printf("useless condition eliminate (%s)\n", ruby_node_name(nd_type(cond))); */
|
||||
ADD_INSNL(ret, nd_line(cond), jump, else_label);
|
||||
break;
|
||||
default:
|
||||
|
@ -2430,7 +2430,7 @@ compile_massign_opt(rb_iseq_t *iseq, LINK_ANCHOR *ret,
|
|||
|
||||
while (rhsn) {
|
||||
if (llen <= rlen) {
|
||||
COMPILE_POPED(ret, "masgn val (poped)", rhsn->nd_head);
|
||||
COMPILE_POPED(ret, "masgn val (popped)", rhsn->nd_head);
|
||||
}
|
||||
else {
|
||||
COMPILE(ret, "masgn val", rhsn->nd_head);
|
||||
|
@ -3518,7 +3518,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
ADD_INSN(ret, nd_line(node), pop);
|
||||
}
|
||||
|
||||
/* resgister catch entry */
|
||||
/* register catch entry */
|
||||
ADD_CATCH_ENTRY(CATCH_TYPE_RESCUE, lstart, lend, rescue, lcont);
|
||||
ADD_CATCH_ENTRY(CATCH_TYPE_RETRY, lend, lcont, 0, lstart);
|
||||
break;
|
||||
|
@ -4039,7 +4039,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
/* reciever */
|
||||
/* receiver */
|
||||
if (type == NODE_CALL) {
|
||||
COMPILE(recv, "recv", node->nd_recv);
|
||||
}
|
||||
|
@ -4149,7 +4149,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
}
|
||||
}
|
||||
|
||||
/* dummy reciever */
|
||||
/* dummy receiver */
|
||||
ADD_INSN1(ret, nd_line(node), putobject,
|
||||
nd_type(node) == NODE_ZSUPER ? Qfalse : Qtrue);
|
||||
ADD_SEQ(ret, args);
|
||||
|
@ -4371,11 +4371,11 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
INT2FIX(0));
|
||||
break;
|
||||
case NODE_MATCH2:
|
||||
COMPILE(recv, "reciever", node->nd_recv);
|
||||
COMPILE(recv, "receiver", node->nd_recv);
|
||||
COMPILE(val, "value", node->nd_value);
|
||||
break;
|
||||
case NODE_MATCH3:
|
||||
COMPILE(recv, "reciever", node->nd_value);
|
||||
COMPILE(recv, "receiver", node->nd_value);
|
||||
COMPILE(val, "value", node->nd_recv);
|
||||
break;
|
||||
}
|
||||
|
@ -5174,7 +5174,7 @@ static int
|
|||
iseq_build_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
|
||||
VALUE body, struct st_table *labels_table)
|
||||
{
|
||||
/* TODO: body should be freezed */
|
||||
/* TODO: body should be frozen */
|
||||
VALUE *ptr = RARRAY_PTR(body);
|
||||
long i, len = RARRAY_LEN(body);
|
||||
int j;
|
||||
|
|
|
@ -1051,9 +1051,9 @@ nucomp_polar(VALUE self)
|
|||
/*
|
||||
* call-seq:
|
||||
* cmp.conj -> complex
|
||||
* cmp.conjucate -> complex
|
||||
* cmp.conjugate -> complex
|
||||
*
|
||||
* Returns the complex conjucate.
|
||||
* Returns the complex conjugate.
|
||||
*/
|
||||
static VALUE
|
||||
nucomp_conj(VALUE self)
|
||||
|
@ -1590,7 +1590,7 @@ string_to_c_strict(VALUE self)
|
|||
*
|
||||
* Returns a complex which denotes the string form. The parser
|
||||
* ignores leading whitespaces and trailing garbage. Any digit
|
||||
* sequences can be separeted by an underscore. Returns zero for null
|
||||
* sequences can be separated by an underscore. Returns zero for null
|
||||
* or garbage string.
|
||||
*
|
||||
* For example:
|
||||
|
@ -1793,7 +1793,7 @@ numeric_polar(VALUE self)
|
|||
/*
|
||||
* call-seq:
|
||||
* num.conj -> self
|
||||
* num.conjucate -> self
|
||||
* num.conjugate -> self
|
||||
*
|
||||
* Returns self.
|
||||
*/
|
||||
|
|
4
cont.c
4
cont.c
|
@ -683,7 +683,7 @@ rb_cont_call(int argc, VALUE *argv, VALUE contval)
|
|||
* 2
|
||||
* FiberError: dead fiber called
|
||||
*
|
||||
* The <code>Fiber#resume</code> method accepts an arbitary number of
|
||||
* The <code>Fiber#resume</code> method accepts an arbitrary number of
|
||||
* parameters, if it is the first call to <code>resume</code> then they
|
||||
* will be passed as block arguments. Otherwise they will be the return
|
||||
* value of the call to <code>Fiber.yield</code>
|
||||
|
@ -1042,7 +1042,7 @@ rb_fiber_m_resume(int argc, VALUE *argv, VALUE fib)
|
|||
* stopped or starting it if it was not resumed before. The calling
|
||||
* fiber will be suspended much like in a call to <code>Fiber.yield</code>.
|
||||
*
|
||||
* The fiber which recieves the transfer call is treats it much like
|
||||
* The fiber which receives the transfer call is treats it much like
|
||||
* a resume call. Arguments passed to transfer are treated like those
|
||||
* passed to resume.
|
||||
*
|
||||
|
|
8
dln.c
8
dln.c
|
@ -1398,7 +1398,7 @@ dln_load(const char *file)
|
|||
NXClose(s);
|
||||
|
||||
/* Cannot call *init_address directory, so copy this value to
|
||||
funtion pointer */
|
||||
function pointer */
|
||||
init_fct = (void(*)())init_address;
|
||||
(*init_fct)();
|
||||
return (void*)init_address;
|
||||
|
@ -1437,10 +1437,10 @@ dln_load(const char *file)
|
|||
# define DLN_DEFINED
|
||||
{
|
||||
status_t err_stat; /* BeOS error status code */
|
||||
image_id img_id; /* extention module unique id */
|
||||
void (*init_fct)(); /* initialize function for extention module */
|
||||
image_id img_id; /* extension module unique id */
|
||||
void (*init_fct)(); /* initialize function for extension module */
|
||||
|
||||
/* load extention module */
|
||||
/* load extension module */
|
||||
img_id = load_add_on(file);
|
||||
if (img_id <= 0) {
|
||||
dln_loaderror("Failed to load add_on %.200s error_code=%x",
|
||||
|
|
|
@ -1009,7 +1009,7 @@ enc_find(VALUE klass, VALUE enc)
|
|||
*
|
||||
* Checks the compatibility of two strings.
|
||||
* If they are compatible, means concatenatable,
|
||||
* returns an encoding which the concatinated string will be.
|
||||
* returns an encoding which the concatenated string will be.
|
||||
* If they are not compatible, nil is returned.
|
||||
*
|
||||
* Encoding.compatible?("\xa1".force_encoding("iso-8859-1"), "b")
|
||||
|
|
2
enum.c
2
enum.c
|
@ -2115,7 +2115,7 @@ chunk_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv)
|
|||
* }
|
||||
*
|
||||
* :_alone can be used to pass through bunch of elements.
|
||||
* For example, sort consective lines formed as Foo#bar and
|
||||
* For example, sort consecutive lines formed as Foo#bar and
|
||||
* pass other lines, chunk can be used as follows.
|
||||
*
|
||||
* pat = /\A[A-Z][A-Za-z0-9_]+\#/
|
||||
|
|
|
@ -516,7 +516,7 @@ enumerator_with_index(int argc, VALUE *argv, VALUE obj)
|
|||
* e.each_with_index {|(*args), idx| ... }
|
||||
* e.each_with_index
|
||||
*
|
||||
* Same as Enumeartor#with_index, except each_with_index does not
|
||||
* Same as Enumerator#with_index, except each_with_index does not
|
||||
* receive an offset argument.
|
||||
*
|
||||
*/
|
||||
|
|
6
gc.c
6
gc.c
|
@ -2307,7 +2307,7 @@ Init_heap(void)
|
|||
* sample_callback(void *vstart, void *vend, int stride, void *data) {
|
||||
* VALUE v = (VALUE)vstart;
|
||||
* for (; v != (VALUE)vend; v += stride) {
|
||||
* if (RBASIC(v)->flasgs) { // liveness check
|
||||
* if (RBASIC(v)->flags) { // liveness check
|
||||
* // do something with live object 'v'
|
||||
* }
|
||||
* return 0; // continue to iteration
|
||||
|
@ -2936,9 +2936,9 @@ count_objects(int argc, VALUE *argv, VALUE os)
|
|||
* call-seq:
|
||||
* GC.count -> Integer
|
||||
*
|
||||
* The number of times GC occured.
|
||||
* The number of times GC occurred.
|
||||
*
|
||||
* It returns the number of times GC occured since the process started.
|
||||
* It returns the number of times GC occurred since the process started.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
12
io.c
12
io.c
|
@ -6298,7 +6298,7 @@ rb_io_stdio_file(rb_io_t *fptr)
|
|||
* === Parameters
|
||||
* fd:: numeric file descriptor
|
||||
* mode:: file mode. a string or an integer
|
||||
* opt:: hash for specifiying mode by name.
|
||||
* opt:: hash for specifying mode by name.
|
||||
*
|
||||
* ==== Mode
|
||||
* When <code>mode</code> is an integer it must be combination of
|
||||
|
@ -6359,7 +6359,7 @@ rb_io_stdio_file(rb_io_t *fptr)
|
|||
* io = IO.new(fd, mode: 'w', cr_newline: true, external_encoding: Encoding::UTF_16LE)
|
||||
* io.puts "Hello, World!"
|
||||
*
|
||||
* both of aboves print "Hello, World!" in UTF-16LE to standard error output with
|
||||
* both of above print "Hello, World!" in UTF-16LE to standard error output with
|
||||
* converting EOL generated by <code>puts</code> to CR.
|
||||
*/
|
||||
|
||||
|
@ -9114,7 +9114,7 @@ argf_readbyte(VALUE argf)
|
|||
* Returns an enumerator which iterates over each line (separated by _sep_,
|
||||
* which defaults to your platform's newline character) of each file in
|
||||
* +ARGV+. If a block is supplied, each line in turn will be yielded to the
|
||||
* block. The optional _limit_ argument is a +Fixnum+ specifying the maximumn
|
||||
* block. The optional _limit_ argument is a +Fixnum+ specifying the maximum
|
||||
* length of each line; longer lines will be split according to this limit.
|
||||
*
|
||||
* This method allows you to treat the files supplied on the command line as
|
||||
|
@ -9415,7 +9415,7 @@ opt_i_get(ID id, VALUE *var)
|
|||
*
|
||||
* Sets the filename extension for inplace editing mode to the given String.
|
||||
* Each file being edited has this value appended to its filename. The
|
||||
* modifed file is saved under this new name.
|
||||
* modified file is saved under this new name.
|
||||
*
|
||||
* For example:
|
||||
*
|
||||
|
@ -9426,7 +9426,7 @@ opt_i_get(ID id, VALUE *var)
|
|||
* print line.sub("foo","bar")
|
||||
* end
|
||||
*
|
||||
* Each line of _file.txt_ has the first occurence of "foo" replaced with
|
||||
* Each line of _file.txt_ has the first occurrence of "foo" replaced with
|
||||
* "bar", then the new line is written out to _file.txt.bak_.
|
||||
*/
|
||||
static VALUE
|
||||
|
@ -9912,7 +9912,7 @@ Init_IO(void)
|
|||
/* truncate size to 0 */
|
||||
rb_file_const("TRUNC", INT2FIX(O_TRUNC));
|
||||
#ifdef O_NOCTTY
|
||||
/* not to make opened IO the controling terminal device */
|
||||
/* not to make opened IO the controlling terminal device */
|
||||
rb_file_const("NOCTTY", INT2FIX(O_NOCTTY));
|
||||
#endif
|
||||
#ifndef O_BINARY
|
||||
|
|
|
@ -869,7 +869,7 @@ clear_dump_arg(struct dump_arg *arg)
|
|||
* call-seq:
|
||||
* dump( obj [, anIO] , limit=--1 ) => anIO
|
||||
*
|
||||
* Serializes obj and all descendent objects. If anIO is
|
||||
* Serializes obj and all descendant objects. If anIO is
|
||||
* specified, the serialized data will be written to it, otherwise the
|
||||
* data will be returned as a String. If limit is specified, the
|
||||
* traversal of subobjects will be limited to that depth. If limit is
|
||||
|
|
|
@ -1116,7 +1116,7 @@ flo_lt(VALUE x, VALUE y)
|
|||
|
||||
/*
|
||||
* call-seq:
|
||||
* flt <= rael -> true or false
|
||||
* flt <= real -> true or false
|
||||
*
|
||||
* <code>true</code> if <code>flt</code> is less than
|
||||
* or equal to <code>real</code>.
|
||||
|
@ -2669,7 +2669,7 @@ fix_lt(VALUE x, VALUE y)
|
|||
|
||||
/*
|
||||
* call-seq:
|
||||
* fix <= rael -> true or false
|
||||
* fix <= real -> true or false
|
||||
*
|
||||
* Returns <code>true</code> if the value of <code>fix</code> is
|
||||
* less than or equal to that of <code>real</code>.
|
||||
|
|
16
object.c
16
object.c
|
@ -38,7 +38,7 @@ static ID id_eq, id_eql, id_match, id_inspect, id_init_copy;
|
|||
* obj === other => true or false
|
||||
*
|
||||
* Case Equality---For class <code>Object</code>, effectively the same
|
||||
* as calling <code>#==</code>, but typically overridden by descendents
|
||||
* as calling <code>#==</code>, but typically overridden by descendants
|
||||
* to provide meaningful semantics in <code>case</code> statements.
|
||||
*/
|
||||
|
||||
|
@ -67,7 +67,7 @@ rb_eql(VALUE obj1, VALUE obj2)
|
|||
*
|
||||
* Equality---At the <code>Object</code> level, <code>==</code> returns
|
||||
* <code>true</code> only if <i>obj</i> and <i>other</i> are the
|
||||
* same object. Typically, this method is overridden in descendent
|
||||
* same object. Typically, this method is overridden in descendant
|
||||
* classes to provide class-specific meaning.
|
||||
*
|
||||
* Unlike <code>==</code>, the <code>equal?</code> method should never be
|
||||
|
@ -257,9 +257,9 @@ rb_obj_clone(VALUE obj)
|
|||
* <code>dup</code> copies the tainted state of <i>obj</i>. See also
|
||||
* the discussion under <code>Object#clone</code>. In general,
|
||||
* <code>clone</code> and <code>dup</code> may have different semantics
|
||||
* in descendent classes. While <code>clone</code> is used to duplicate
|
||||
* in descendant classes. While <code>clone</code> is used to duplicate
|
||||
* an object, including its internal state, <code>dup</code> typically
|
||||
* uses the class of the descendent object to create the new instance.
|
||||
* uses the class of the descendant object to create the new instance.
|
||||
*
|
||||
* This method may have class-specific behavior. If so, that
|
||||
* behavior will be documented under the #+initialize_copy+ method of
|
||||
|
@ -1092,7 +1092,7 @@ rb_false(VALUE obj)
|
|||
* call-seq:
|
||||
* obj =~ other => nil
|
||||
*
|
||||
* Pattern Match---Overridden by descendents (notably
|
||||
* Pattern Match---Overridden by descendants (notably
|
||||
* <code>Regexp</code> and <code>String</code>) to provide meaningful
|
||||
* pattern-match semantics.
|
||||
*/
|
||||
|
@ -1139,7 +1139,7 @@ rb_obj_cmp(VALUE obj1, VALUE obj2)
|
|||
* called without creating an encapsulating object, while instance
|
||||
* methods may not. (See <code>Module#module_function</code>)
|
||||
*
|
||||
* In the descriptions that follow, the parameter <i>syml</i> refers
|
||||
* In the descriptions that follow, the parameter <i>sym</i> refers
|
||||
* to a symbol, which is either a quoted string or a
|
||||
* <code>Symbol</code> (such as <code>:name</code>).
|
||||
*
|
||||
|
@ -1209,7 +1209,7 @@ rb_mod_freeze(VALUE mod)
|
|||
* mod === obj => true or false
|
||||
*
|
||||
* Case Equality---Returns <code>true</code> if <i>anObject</i> is an
|
||||
* instance of <i>mod</i> or one of <i>mod</i>'s descendents. Of
|
||||
* instance of <i>mod</i> or one of <i>mod</i>'s descendants. Of
|
||||
* limited use for modules, but can be used in <code>case</code>
|
||||
* statements to classify objects by class.
|
||||
*/
|
||||
|
@ -2162,7 +2162,7 @@ rb_Integer(VALUE val)
|
|||
* (<code>0</code>, <code>0b</code>, and <code>0x</code>) are honored.
|
||||
* In any case, strings should be strictly conformed to numeric
|
||||
* representation. This behavior is different from that of
|
||||
* <code>String#to_i</code>. Non string valueswill be converted using
|
||||
* <code>String#to_i</code>. Non string values will be converted using
|
||||
* <code>to_int</code>, and <code>to_i</code>.
|
||||
*
|
||||
* Integer(123.999) #=> 123
|
||||
|
|
6
pack.c
6
pack.c
|
@ -166,7 +166,7 @@ swapd(const double d)
|
|||
memcpy(&dtmp,utmp,sizeof(double));
|
||||
return dtmp;
|
||||
}
|
||||
#else /* SIZEOF_DOUBLE == 8 but undivied by known size of int */
|
||||
#else /* SIZEOF_DOUBLE == 8 but undivide by known size of int */
|
||||
define_swapx(d, double)
|
||||
#endif /* #if SIZEOF_SHORT == 4 */
|
||||
#endif /* #if SIZEOF_LONG == 4 */
|
||||
|
@ -428,7 +428,7 @@ static unsigned long utf8_to_uv(const char*,long*);
|
|||
* u | UU-encoded string
|
||||
* V | Long, little-endian byte order
|
||||
* v | Short, little-endian byte order
|
||||
* w | BER-compressed integer\fnm
|
||||
* w | BER-compressed integer
|
||||
* X | Back up a byte
|
||||
* x | Null byte
|
||||
* Z | Same as ``a'', except that null is added with *
|
||||
|
@ -1287,7 +1287,7 @@ infected_str_new(const char *ptr, long len, VALUE str)
|
|||
* | | short in network byte order
|
||||
* -------+---------+-----------------------------------------
|
||||
* P | String | treat sizeof(char *) characters as a
|
||||
* | | pointer, and return \emph{len} characters
|
||||
* | | pointer, and return the length bytes
|
||||
* | | from the referenced location
|
||||
* -------+---------+-----------------------------------------
|
||||
* p | String | treat sizeof(char *) characters as a
|
||||
|
|
4
proc.c
4
proc.c
|
@ -1148,7 +1148,7 @@ rb_obj_method(VALUE obj, VALUE vid)
|
|||
* call-seq:
|
||||
* obj.public_method(sym) => method
|
||||
*
|
||||
* Similar to _methd_, searches public method only.
|
||||
* Similar to _method_, searches public method only.
|
||||
*/
|
||||
|
||||
VALUE
|
||||
|
@ -1199,7 +1199,7 @@ rb_mod_instance_method(VALUE mod, VALUE vid)
|
|||
* call-seq:
|
||||
* mod.public_instance_method(symbol) => unbound_method
|
||||
*
|
||||
* Similar to _instance_methd_, searches public method only.
|
||||
* Similar to _instance_method_, searches public method only.
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
|
|
2
random.c
2
random.c
|
@ -970,7 +970,7 @@ float_value(VALUE v)
|
|||
* prng.rand(5.0..9.0) # => between 5.0 and 9.0, including 9.0
|
||||
* prng.rand(5.0...9.0) # => between 5.0 and 9.0, excluding 9.0
|
||||
*
|
||||
* +begin+/+end+ of the range have to have subtruct and add methods.
|
||||
* +begin+/+end+ of the range have to have subtract and add methods.
|
||||
*
|
||||
* Otherwise, it raises an ArgumentError.
|
||||
*/
|
||||
|
|
|
@ -1384,7 +1384,7 @@ nurat_to_r(VALUE self)
|
|||
the choice of a. Therefore we can simply ignore this case.
|
||||
Note 2: At first, we need to consider the closed interval [a,b].
|
||||
but since a and b have the denominator 2^(|e|+1) whereas x itself
|
||||
has a denominator <= 2^|e|, we can restrict the seach to the open
|
||||
has a denominator <= 2^|e|, we can restrict the search to the open
|
||||
interval (a,b).
|
||||
So, for given a and b (0 < a < b) we are searching a rational number
|
||||
y with a <= y <= b.
|
||||
|
@ -2097,7 +2097,7 @@ string_to_r_strict(VALUE self)
|
|||
*
|
||||
* Returns a rational which denotes the string form. The parser
|
||||
* ignores leading whitespaces and trailing garbage. Any digit
|
||||
* sequences can be separeted by an underscore. Returns zero for null
|
||||
* sequences can be separated by an underscore. Returns zero for null
|
||||
* or garbage string.
|
||||
*
|
||||
* NOTE: '0.3'.to_r isn't the same as 0.3.to_r. The former is
|
||||
|
@ -2223,7 +2223,7 @@ nurat_s_convert(int argc, VALUE *argv, VALUE klass)
|
|||
* Rational(4, -6) #=> (-2/3)
|
||||
* 3.to_r #=> (3/1)
|
||||
*
|
||||
* You can also create ratioanl object from floating-point numbers or
|
||||
* You can also create rational object from floating-point numbers or
|
||||
* strings.
|
||||
*
|
||||
* Rational(0.3) #=> (5404319552844595/18014398509481984)
|
||||
|
|
4
signal.c
4
signal.c
|
@ -330,7 +330,7 @@ ruby_default_signal(int sig)
|
|||
* If _signal_ is an integer but wrong for signal,
|
||||
* <code>Errno::EINVAL</code> or +RangeError+ will be raised.
|
||||
* Otherwise unless _signal_ is a +String+ or a +Symbol+, and a known
|
||||
* sinal name, +ArgumentError+ will be raised.
|
||||
* signal name, +ArgumentError+ will be raised.
|
||||
*
|
||||
* Also, <code>Errno::ESRCH</code> or +RangeError+ for invalid _pid_,
|
||||
* <code>Errno::EPERM</code> when failed because of no privilege,
|
||||
|
@ -606,7 +606,7 @@ sigsegv(int sig SIGINFO_ARG)
|
|||
}
|
||||
#endif
|
||||
if (segv_received) {
|
||||
fprintf(stderr, "SEGV recieved in SEGV handler\n");
|
||||
fprintf(stderr, "SEGV received in SEGV handler\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -577,7 +577,7 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct vtm *vtm,
|
|||
continue;
|
||||
#endif /* MAILHEADER_EXT */
|
||||
|
||||
case 'Z': /* time zone name or abbrevation */
|
||||
case 'Z': /* time zone name or abbreviation */
|
||||
if (flags & BIT_OF(CHCASE)) {
|
||||
flags &= ~(BIT_OF(UPPER)|BIT_OF(CHCASE));
|
||||
flags |= BIT_OF(LOWER);
|
||||
|
|
10
thread.c
10
thread.c
|
@ -9,7 +9,7 @@
|
|||
**********************************************************************/
|
||||
|
||||
/*
|
||||
YARV Thread Desgin
|
||||
YARV Thread Design
|
||||
|
||||
model 1: Userlevel Thread
|
||||
Same as traditional ruby thread.
|
||||
|
@ -465,7 +465,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
|
|||
st_delete_wrap(th->vm->living_threads, th->self);
|
||||
}
|
||||
|
||||
/* wake up joinning threads */
|
||||
/* wake up joining threads */
|
||||
join_th = th->join_list_head;
|
||||
while (join_th) {
|
||||
if (join_th == main_th) errinfo = Qnil;
|
||||
|
@ -1035,10 +1035,10 @@ rb_thread_blocking_region_end(struct rb_blocking_region_buffer *region)
|
|||
* (1) release GVL.
|
||||
* Other Ruby threads may run in parallel.
|
||||
* (2) call func with data1.
|
||||
* (3) aquire GVL.
|
||||
* (3) acquire GVL.
|
||||
* Other Ruby threads can not run in parallel any more.
|
||||
*
|
||||
* If another thread interrupts this thread (Thread#kill, signal deliverly,
|
||||
* If another thread interrupts this thread (Thread#kill, signal delivery,
|
||||
* VM-shutdown request, and so on), `ubf()' is called (`ubf()' means
|
||||
* "un-blocking function"). `ubf()' should interrupt `func()' execution.
|
||||
*
|
||||
|
@ -1154,7 +1154,7 @@ rb_thread_call_with_gvl(void *(*func)(void *), void *data1)
|
|||
blocking_region_end(th, brb);
|
||||
/* enter to Ruby world: You can access Ruby values, methods and so on. */
|
||||
r = (*func)(data1);
|
||||
/* levae from Ruby world: You can not access Ruby values, etc. */
|
||||
/* leave from Ruby world: You can not access Ruby values, etc. */
|
||||
blocking_region_begin(th, brb, prev_unblock.func, prev_unblock.arg);
|
||||
return r;
|
||||
}
|
||||
|
|
2
time.c
2
time.c
|
@ -381,7 +381,7 @@ gmtimexv_noleapsecond(VALUE timexv, struct vtm *vtm)
|
|||
|
||||
/* 30 years including 7 leap days (1972, 1976, ... 1996),
|
||||
* 31 days in January 2000 and
|
||||
* 29 days in Febrary 2000
|
||||
* 29 days in February 2000
|
||||
* from 1970-01-01 to 2000-02-29 */
|
||||
if (30*365+7+31+29-1 <= n) {
|
||||
/* 2000-02-29 or after */
|
||||
|
|
|
@ -3317,7 +3317,7 @@ econv_destination_encoding(VALUE self)
|
|||
*
|
||||
* The result is an array of conversions.
|
||||
*
|
||||
* ec = Encoding::Converter.new("ISo-8859-1", "EUC-JP", crlf_newline: true)
|
||||
* ec = Encoding::Converter.new("ISO-8859-1", "EUC-JP", crlf_newline: true)
|
||||
* p ec.convpath
|
||||
* #=> [[#<Encoding:ISO-8859-1>, #<Encoding:UTF-8>],
|
||||
* # [#<Encoding:UTF-8>, #<Encoding:EUC-JP>],
|
||||
|
|
|
@ -69,7 +69,7 @@ typedef enum {
|
|||
asciicompat_converter, /* ASCII-compatible -> ASCII-compatible */
|
||||
asciicompat_decoder, /* ASCII-incompatible -> ASCII-compatible */
|
||||
asciicompat_encoder /* ASCII-compatible -> ASCII-incompatible */
|
||||
/* ASCII-incompatible -> ASCII-incompatible is intentionally ommitted. */
|
||||
/* ASCII-incompatible -> ASCII-incompatible is intentionally omitted. */
|
||||
} rb_transcoder_asciicompat_type_t;
|
||||
|
||||
typedef struct rb_transcoder rb_transcoder;
|
||||
|
|
2
util.c
2
util.c
|
@ -443,7 +443,7 @@ ruby_qsort(void* base, const size_t nel, const size_t size,
|
|||
{
|
||||
register char *l, *r, *m; /* l,r:left,right group m:median point */
|
||||
register int t, eq_l, eq_r; /* eq_l: all items in left group are equal to S */
|
||||
char *L = base; /* left end of curren region */
|
||||
char *L = base; /* left end of current region */
|
||||
char *R = (char*)base + size*(nel-1); /* right end of current region */
|
||||
size_t chklim = 63; /* threshold of ordering element check */
|
||||
stack_node stack[32], *top = stack; /* 32 is enough for 32bit CPU */
|
||||
|
|
|
@ -1385,7 +1385,7 @@ catch_i(VALUE tag, VALUE data)
|
|||
*
|
||||
* when _arg_ is given, +catch+ yields it as is, or when no
|
||||
* _arg_ is given, +catch+ assigns a new unique object to
|
||||
* +throw+. this is usefull for nested +catch+. _arg_ can
|
||||
* +throw+. this is useful for nested +catch+. _arg_ can
|
||||
* be an arbitrary object, not only Symbol.
|
||||
*
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue