[DOC] fix markups [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2019-03-28 03:33:35 +00:00
parent 832bc50768
commit de0ef1a9df
12 changed files with 186 additions and 197 deletions

6
pack.c
View File

@ -186,7 +186,7 @@ VALUE_to_float(VALUE obj)
* exclamation mark (``<code>!</code>'') to use the underlying * exclamation mark (``<code>!</code>'') to use the underlying
* platform's native size for the specified type; otherwise, they use a * platform's native size for the specified type; otherwise, they use a
* platform-independent size. Spaces are ignored in the template * platform-independent size. Spaces are ignored in the template
* string. See also <code>String#unpack</code>. * string. See also String#unpack.
* *
* a = [ "a", "b", "c" ] * a = [ "a", "b", "c" ]
* n = [ 65, 66, 67 ] * n = [ 65, 66, 67 ]
@ -1805,7 +1805,7 @@ pack_unpack_internal(VALUE str, VALUE fmt, int mode)
* exclamation mark (``<code>!</code>'') to use the underlying * exclamation mark (``<code>!</code>'') to use the underlying
* platform's native size for the specified type; otherwise, it uses a * platform's native size for the specified type; otherwise, it uses a
* platform-independent consistent size. Spaces are ignored in the * platform-independent consistent size. Spaces are ignored in the
* format string. See also <code>String#unpack1</code>, <code>Array#pack</code>. * format string. See also String#unpack1, Array#pack.
* *
* "abc \0\0abc \0\0".unpack('A6Z6') #=> ["abc", "abc "] * "abc \0\0abc \0\0".unpack('A6Z6') #=> ["abc", "abc "]
* "abc \0\0".unpack('a3a3') #=> ["abc", " \000\000"] * "abc \0\0".unpack('a3a3') #=> ["abc", " \000\000"]
@ -1922,7 +1922,7 @@ pack_unpack(VALUE str, VALUE fmt)
* *
* Decodes <i>str</i> (which may contain binary data) according to the * Decodes <i>str</i> (which may contain binary data) according to the
* format string, returning the first value extracted. * format string, returning the first value extracted.
* See also <code>String#unpack</code>, <code>Array#pack</code>. * See also String#unpack, Array#pack.
*/ */
static VALUE static VALUE

100
proc.c
View File

@ -755,10 +755,10 @@ proc_new(VALUE klass, int8_t is_lambda)
* Proc.new {|...| block } -> a_proc * Proc.new {|...| block } -> a_proc
* Proc.new -> a_proc * Proc.new -> a_proc
* *
* Creates a new <code>Proc</code> object, bound to the current * Creates a new Proc object, bound to the current context. Proc::new
* context. <code>Proc::new</code> may be called without a block only * may be called without a block only within a method with an
* within a method with an attached block, in which case that block is * attached block, in which case that block is converted to the Proc
* converted to the <code>Proc</code> object. * object.
* *
* def proc_from * def proc_from
* Proc.new * Proc.new
@ -780,7 +780,7 @@ rb_proc_s_new(int argc, VALUE *argv, VALUE klass)
* call-seq: * call-seq:
* proc { |...| block } -> a_proc * proc { |...| block } -> a_proc
* *
* Equivalent to <code>Proc.new</code>. * Equivalent to Proc.new.
*/ */
VALUE VALUE
@ -793,8 +793,8 @@ rb_block_proc(void)
* call-seq: * call-seq:
* lambda { |...| block } -> a_proc * lambda { |...| block } -> a_proc
* *
* Equivalent to <code>Proc.new</code>, except the resulting Proc objects * Equivalent to Proc.new, except the resulting Proc objects check the
* check the number of parameters passed when called. * number of parameters passed when called.
*/ */
VALUE VALUE
@ -839,11 +839,11 @@ rb_block_lambda(void)
* Note that <code>prc.()</code> invokes <code>prc.call()</code> with * Note that <code>prc.()</code> invokes <code>prc.call()</code> with
* the parameters given. It's syntactic sugar to hide "call". * the parameters given. It's syntactic sugar to hide "call".
* *
* For procs created using <code>lambda</code> or <code>->()</code> an error * For procs created using #lambda or <code>->()</code> an error is
* is generated if the wrong number of parameters are passed to the proc. * generated if the wrong number of parameters are passed to the
* For procs created using <code>Proc.new</code> or <code>Kernel.proc</code>, * proc. For procs created using Proc.new or Kernel.proc, extra
* extra parameters are silently discarded and missing parameters are * parameters are silently discarded and missing parameters are set
* set to +nil+. * to +nil+.
* *
* a_proc = proc {|a,b| [a,b] } * a_proc = proc {|a,b| [a,b] }
* a_proc.call(1) #=> [1, nil] * a_proc.call(1) #=> [1, nil]
@ -921,8 +921,8 @@ rb_proc_call_with_block(VALUE self, int argc, const VALUE *argv, VALUE passed_pr
* in this latter case, returns n. * in this latter case, returns n.
* Keyword arguments will be considered as a single additional argument, * Keyword arguments will be considered as a single additional argument,
* that argument being mandatory if any keyword argument is mandatory. * that argument being mandatory if any keyword argument is mandatory.
* A <code>proc</code> with no argument declarations * A #proc with no argument declarations is the same as a block
* is the same as a block declaring <code>||</code> as its arguments. * declaring <code>||</code> as its arguments.
* *
* proc {}.arity #=> 0 * proc {}.arity #=> 0
* proc { || }.arity #=> 0 * proc { || }.arity #=> 0
@ -1302,9 +1302,8 @@ proc_to_s(VALUE self)
* call-seq: * call-seq:
* prc.to_proc -> proc * prc.to_proc -> proc
* *
* Part of the protocol for converting objects to <code>Proc</code> * Part of the protocol for converting objects to Proc objects.
* objects. Instances of class <code>Proc</code> simply return * Instances of class Proc simply return themselves.
* themselves.
*/ */
static VALUE static VALUE
@ -1476,12 +1475,11 @@ method_entry_defined_class(const rb_method_entry_t *me)
* *
* Document-class: Method * Document-class: Method
* *
* Method objects are created by <code>Object#method</code>, and are * Method objects are created by Object#method, and are associated
* associated with a particular object (not just with a class). They * with a particular object (not just with a class). They may be
* may be used to invoke the method within the object, and as a block * used to invoke the method within the object, and as a block
* associated with an iterator. They may also be unbound from one * associated with an iterator. They may also be unbound from one
* object (creating an <code>UnboundMethod</code>) and bound to * object (creating an UnboundMethod) and bound to another.
* another.
* *
* class Thing * class Thing
* def square(n) * def square(n)
@ -1567,8 +1565,8 @@ method_hash(VALUE method)
* meth.unbind -> unbound_method * meth.unbind -> unbound_method
* *
* Dissociates <i>meth</i> from its current receiver. The resulting * Dissociates <i>meth</i> from its current receiver. The resulting
* <code>UnboundMethod</code> can subsequently be bound to a new object * UnboundMethod can subsequently be bound to a new object of the
* of the same class (see <code>UnboundMethod</code>). * same class (see UnboundMethod).
*/ */
static VALUE static VALUE
@ -1711,10 +1709,9 @@ obj_method(VALUE obj, VALUE vid, int scope)
* obj.method(sym) -> method * obj.method(sym) -> method
* *
* Looks up the named method as a receiver in <i>obj</i>, returning a * Looks up the named method as a receiver in <i>obj</i>, returning a
* <code>Method</code> object (or raising <code>NameError</code>). The * Method object (or raising NameError). The Method object acts as a
* <code>Method</code> object acts as a closure in <i>obj</i>'s object * closure in <i>obj</i>'s object instance, so instance variables and
* instance, so instance variables and the value of <code>self</code> * the value of <code>self</code> remain available.
* remain available.
* *
* class Demo * class Demo
* def initialize(n) * def initialize(n)
@ -1733,8 +1730,8 @@ obj_method(VALUE obj, VALUE vid, int scope)
* m = l.method("hello") * m = l.method("hello")
* m.call #=> "Hello, @iv = Fred" * m.call #=> "Hello, @iv = Fred"
* *
* Note that <code>Method</code> implements <code>to_proc</code> method, * Note that Method implements <code>to_proc</code> method, which
* which means it can be used with iterators. * means it can be used with iterators.
* *
* [ 1, 2, 3 ].each(&method(:puts)) # => prints 3 lines to stdout * [ 1, 2, 3 ].each(&method(:puts)) # => prints 3 lines to stdout
* *
@ -1881,7 +1878,7 @@ rb_mod_public_instance_method(VALUE mod, VALUE vid)
* Defines an instance method in the receiver. The _method_ * Defines an instance method in the receiver. The _method_
* parameter can be a +Proc+, a +Method+ or an +UnboundMethod+ object. * parameter can be a +Proc+, a +Method+ or an +UnboundMethod+ object.
* If a block is specified, it is used as the method body. This block * If a block is specified, it is used as the method body. This block
* is evaluated using <code>instance_eval</code>. * is evaluated using #instance_eval.
* *
* class A * class A
* def fred * def fred
@ -2190,17 +2187,16 @@ rb_method_call_with_block(int argc, const VALUE *argv, VALUE method, VALUE passe
* *
* Document-class: UnboundMethod * Document-class: UnboundMethod
* *
* Ruby supports two forms of objectified methods. Class * Ruby supports two forms of objectified methods. Class Method is
* <code>Method</code> is used to represent methods that are associated * used to represent methods that are associated with a particular
* with a particular object: these method objects are bound to that * object: these method objects are bound to that object. Bound
* object. Bound method objects for an object can be created using * method objects for an object can be created using Object#method.
* <code>Object#method</code>.
* *
* Ruby also supports unbound methods; methods objects that are not * Ruby also supports unbound methods; methods objects that are not
* associated with a particular object. These can be created either by * associated with a particular object. These can be created either
* calling <code>Module#instance_method</code> or by calling * by calling Module#instance_method or by calling #unbind on a bound
* <code>unbind</code> on a bound method object. The result of both of * method object. The result of both of these is an UnboundMethod
* these is an <code>UnboundMethod</code> object. * object.
* *
* Unbound methods can only be called after they are bound to an * Unbound methods can only be called after they are bound to an
* object. That object must be a kind_of? the method's original * object. That object must be a kind_of? the method's original
@ -2246,9 +2242,9 @@ rb_method_call_with_block(int argc, const VALUE *argv, VALUE method, VALUE passe
* call-seq: * call-seq:
* umeth.bind(obj) -> method * umeth.bind(obj) -> method
* *
* Bind <i>umeth</i> to <i>obj</i>. If <code>Klass</code> was the class * Bind <i>umeth</i> to <i>obj</i>. If Klass was the class from which
* from which <i>umeth</i> was obtained, * <i>umeth</i> was obtained, <code>obj.kind_of?(Klass)</code> must
* <code>obj.kind_of?(Klass)</code> must be true. * be true.
* *
* class A * class A
* def test * def test
@ -2725,7 +2721,7 @@ rb_proc_new(
* call-seq: * call-seq:
* meth.to_proc -> proc * meth.to_proc -> proc
* *
* Returns a <code>Proc</code> object corresponding to this method. * Returns a Proc object corresponding to this method.
*/ */
static VALUE static VALUE
@ -3399,7 +3395,7 @@ rb_method_compose_to_right(VALUE self, VALUE g)
* end * end
* C.new.f(1,2) #=> ArgumentError * C.new.f(1,2) #=> ArgumentError
* *
* The wrapper <i>def2</i> receives <code>body</code> as a non-lambda proc, * The wrapper <code>def2</code> receives _body_ as a non-lambda proc,
* yet defines a method which has normal semantics. * yet defines a method which has normal semantics.
* *
* == Conversion of other objects to procs * == Conversion of other objects to procs
@ -3552,16 +3548,16 @@ Init_Proc(void)
} }
/* /*
* Objects of class <code>Binding</code> encapsulate the execution * Objects of class Binding encapsulate the execution context at some
* context at some particular place in the code and retain this context * particular place in the code and retain this context for future
* for future use. The variables, methods, value of <code>self</code>, * use. The variables, methods, value of <code>self</code>, and
* and possibly an iterator block that can be accessed in this context * possibly an iterator block that can be accessed in this context
* are all retained. Binding objects can be created using * are all retained. Binding objects can be created using
* <code>Kernel#binding</code>, and are made available to the callback * Kernel#binding, and are made available to the callback of
* of <code>Kernel#set_trace_func</code>. * Kernel#set_trace_func.
* *
* These binding objects can be passed as the second argument of the * These binding objects can be passed as the second argument of the
* <code>Kernel#eval</code> method, establishing an environment for the * Kernel#eval method, establishing an environment for the
* evaluation. * evaluation.
* *
* class Demo * class Demo

134
process.c
View File

@ -463,10 +463,10 @@ get_ppid(void)
* *
* Document-class: Process::Status * Document-class: Process::Status
* *
* <code>Process::Status</code> encapsulates the information on the * Process::Status encapsulates the information on the
* status of a running or terminated system process. The built-in * status of a running or terminated system process. The built-in
* variable <code>$?</code> is either +nil+ or a * variable <code>$?</code> is either +nil+ or a
* <code>Process::Status</code> object. * Process::Status object.
* *
* fork { exit 99 } #=> 26557 * fork { exit 99 } #=> 26557
* Process.wait #=> 26557 * Process.wait #=> 26557
@ -483,7 +483,7 @@ get_ppid(void)
* information (for example the program's return code in the case of * information (for example the program's return code in the case of
* exited processes). Pre Ruby 1.8, these bits were exposed directly * exited processes). Pre Ruby 1.8, these bits were exposed directly
* to the Ruby program. Ruby now encapsulates these in a * to the Ruby program. Ruby now encapsulates these in a
* <code>Process::Status</code> object. To maximize compatibility, * Process::Status object. To maximize compatibility,
* however, these objects retain a bit-oriented interface. In the * however, these objects retain a bit-oriented interface. In the
* descriptions that follow, when we talk about the integer value of * descriptions that follow, when we talk about the integer value of
* _stat_, we're referring to this 16 bit value. * _stat_, we're referring to this 16 bit value.
@ -538,7 +538,7 @@ rb_last_status_clear(void)
* stat.to_i -> integer * stat.to_i -> integer
* stat.to_int -> integer * stat.to_int -> integer
* *
* Returns the bits in _stat_ as a <code>Integer</code>. Poking * Returns the bits in _stat_ as a Integer. Poking
* around in these bits is platform dependent. * around in these bits is platform dependent.
* *
* fork { exit 0xab } #=> 26566 * fork { exit 0xab } #=> 26566
@ -736,9 +736,9 @@ pst_rshift(VALUE st1, VALUE st2)
* call-seq: * call-seq:
* stat.stopped? -> true or false * stat.stopped? -> true or false
* *
* Returns +true+ if this process is stopped. This is only * Returns +true+ if this process is stopped. This is only returned
* returned if the corresponding <code>wait</code> call had the * if the corresponding #wait call had the Process::WUNTRACED flag
* <code>WUNTRACED</code> flag set. * set.
*/ */
static VALUE static VALUE
@ -838,8 +838,7 @@ pst_wifexited(VALUE st)
* stat.exitstatus -> integer or nil * stat.exitstatus -> integer or nil
* *
* Returns the least significant eight bits of the return code of * Returns the least significant eight bits of the return code of
* _stat_. Only available if <code>exited?</code> is * _stat_. Only available if #exited? is +true+.
* +true+.
* *
* fork { } #=> 26572 * fork { } #=> 26572
* Process.wait #=> 26572 * Process.wait #=> 26572
@ -868,7 +867,7 @@ pst_wexitstatus(VALUE st)
* stat.success? -> true, false or nil * stat.success? -> true, false or nil
* *
* Returns +true+ if _stat_ is successful, +false+ if not. * Returns +true+ if _stat_ is successful, +false+ if not.
* Returns +nil+ if <code>exited?</code> is not +true+. * Returns +nil+ if #exited? is not +true+.
*/ */
static VALUE static VALUE
@ -1241,7 +1240,7 @@ rb_waitpid(rb_pid_t pid, int *st, int flags)
* Process.waitpid(pid=-1, flags=0) -> integer * Process.waitpid(pid=-1, flags=0) -> integer
* *
* Waits for a child process to exit, returns its process id, and * Waits for a child process to exit, returns its process id, and
* sets <code>$?</code> to a <code>Process::Status</code> object * sets <code>$?</code> to a Process::Status object
* containing information on that process. Which child it waits on * containing information on that process. Which child it waits on
* depends on the value of _pid_: * depends on the value of _pid_:
* *
@ -1257,8 +1256,8 @@ rb_waitpid(rb_pid_t pid, int *st, int flags)
* value of _pid_. * value of _pid_.
* *
* The _flags_ argument may be a logical or of the flag values * The _flags_ argument may be a logical or of the flag values
* <code>Process::WNOHANG</code> (do not block if no child available) * Process::WNOHANG (do not block if no child available)
* or <code>Process::WUNTRACED</code> (return stopped children that * or Process::WUNTRACED (return stopped children that
* haven't been reported). Not all flags are available on all * haven't been reported). Not all flags are available on all
* platforms, but a flag value of zero will work on all platforms. * platforms, but a flag value of zero will work on all platforms.
* *
@ -1312,7 +1311,7 @@ proc_wait(int argc, VALUE *argv)
* *
* Waits for a child process to exit (see Process::waitpid for exact * Waits for a child process to exit (see Process::waitpid for exact
* semantics) and returns an array containing the process id and the * semantics) and returns an array containing the process id and the
* exit status (a <code>Process::Status</code> object) of that * exit status (a Process::Status object) of that
* child. Raises a SystemCallError if there are no child processes. * child. Raises a SystemCallError if there are no child processes.
* *
* Process.fork { exit 99 } #=> 27437 * Process.fork { exit 99 } #=> 27437
@ -1336,7 +1335,7 @@ proc_wait2(int argc, VALUE *argv)
* *
* Waits for all children, returning an array of * Waits for all children, returning an array of
* _pid_/_status_ pairs (where _status_ is a * _pid_/_status_ pairs (where _status_ is a
* <code>Process::Status</code> object). * Process::Status object).
* *
* fork { sleep 0.2; exit 2 } #=> 27432 * fork { sleep 0.2; exit 2 } #=> 27432
* fork { sleep 0.1; exit 1 } #=> 27433 * fork { sleep 0.1; exit 1 } #=> 27433
@ -1411,18 +1410,17 @@ rb_detach_process(rb_pid_t pid)
* processes until the parent collects that status (normally using * processes until the parent collects that status (normally using
* some variant of <code>wait()</code>). If the parent never collects * some variant of <code>wait()</code>). If the parent never collects
* this status, the child stays around as a <em>zombie</em> process. * this status, the child stays around as a <em>zombie</em> process.
* <code>Process::detach</code> prevents this by setting up a * Process::detach prevents this by setting up a separate Ruby thread
* separate Ruby thread whose sole job is to reap the status of the * whose sole job is to reap the status of the process _pid_ when it
* process _pid_ when it terminates. Use <code>detach</code> * terminates. Use #detach only when you do not intend to explicitly
* only when you do not intend to explicitly wait for the child to * wait for the child to terminate.
* terminate.
* *
* The waiting thread returns the exit status of the detached process * The waiting thread returns the exit status of the detached process
* when it terminates, so you can use <code>Thread#join</code> to * when it terminates, so you can use Thread#join to
* know the result. If specified _pid_ is not a valid child process * know the result. If specified _pid_ is not a valid child process
* ID, the thread returns +nil+ immediately. * ID, the thread returns +nil+ immediately.
* *
* The waiting thread has <code>pid</code> method which returns the pid. * The waiting thread has #pid method which returns the pid.
* *
* In this first example, we don't reap the first child process, so * In this first example, we don't reap the first child process, so
* it appears as a zombie in the process status display. * it appears as a zombie in the process status display.
@ -1437,7 +1435,7 @@ rb_detach_process(rb_pid_t pid)
* *
* 27389 Z * 27389 Z
* *
* In the next example, <code>Process::detach</code> is used to reap * In the next example, Process::detach is used to reap
* the child automatically. * the child automatically.
* *
* p1 = fork { sleep 0.1 } * p1 = fork { sleep 0.1 }
@ -2914,7 +2912,7 @@ rb_execarg_fail(VALUE execarg_obj, int err, const char *errmsg)
* This behavior is modified by the given +env+ and +options+ parameters. See * This behavior is modified by the given +env+ and +options+ parameters. See
* ::spawn for details. * ::spawn for details.
* *
* If the command fails to execute (typically <code>Errno::ENOENT</code> when * If the command fails to execute (typically Errno::ENOENT when
* it was not found) a SystemCallError exception is raised. * it was not found) a SystemCallError exception is raised.
* *
* This method modifies process attributes according to given +options+ before * This method modifies process attributes according to given +options+ before
@ -4072,15 +4070,14 @@ COMPILER_WARNING_POP
* *
* Creates a subprocess. If a block is specified, that block is run * Creates a subprocess. If a block is specified, that block is run
* in the subprocess, and the subprocess terminates with a status of * in the subprocess, and the subprocess terminates with a status of
* zero. Otherwise, the +fork+ call returns twice, once in * zero. Otherwise, the +fork+ call returns twice, once in the
* the parent, returning the process ID of the child, and once in * parent, returning the process ID of the child, and once in the
* the child, returning _nil_. The child process can exit using * child, returning _nil_. The child process can exit using
* <code>Kernel.exit!</code> to avoid running any * Kernel.exit! to avoid running any <code>at_exit</code>
* <code>at_exit</code> functions. The parent process should * functions. The parent process should use Process.wait to collect
* use <code>Process.wait</code> to collect the termination statuses * the termination statuses of its children or use Process.detach to
* of its children or use <code>Process.detach</code> to register * register disinterest in their status; otherwise, the operating
* disinterest in their status; otherwise, the operating system * system may accumulate zombie processes.
* may accumulate zombie processes.
* *
* The thread calling fork is the only thread in the created child process. * The thread calling fork is the only thread in the created child process.
* fork doesn't copy other threads. * fork doesn't copy other threads.
@ -4189,7 +4186,7 @@ rb_exit(int status)
* Process::exit(status=true) * Process::exit(status=true)
* *
* Initiates the termination of the Ruby script by raising the * Initiates the termination of the Ruby script by raising the
* <code>SystemExit</code> exception. This exception may be caught. The * SystemExit exception. This exception may be caught. The
* optional parameter is used to return a status code to the invoking * optional parameter is used to return a status code to the invoking
* environment. * environment.
* +true+ and +FALSE+ of _status_ means success and failure * +true+ and +FALSE+ of _status_ means success and failure
@ -4209,9 +4206,9 @@ rb_exit(int status)
* rescued a SystemExit exception * rescued a SystemExit exception
* after begin block * after begin block
* *
* Just prior to termination, Ruby executes any <code>at_exit</code> functions * Just prior to termination, Ruby executes any <code>at_exit</code>
* (see Kernel::at_exit) and runs any object finalizers (see * functions (see Kernel::at_exit) and runs any object finalizers
* ObjectSpace::define_finalizer). * (see ObjectSpace::define_finalizer).
* *
* at_exit { puts "at_exit function" } * at_exit { puts "at_exit function" }
* ObjectSpace.define_finalizer("string", proc { puts "in finalizer" }) * ObjectSpace.define_finalizer("string", proc { puts "in finalizer" })
@ -4440,8 +4437,7 @@ rb_spawn(int argc, const VALUE *argv)
* The arguments are processed in the same way as * The arguments are processed in the same way as
* for Kernel#spawn. * for Kernel#spawn.
* *
* The hash arguments, env and options, are same as * The hash arguments, env and options, are same as #exec and #spawn.
* <code>exec</code> and <code>spawn</code>.
* See Kernel#spawn for details. * See Kernel#spawn for details.
* *
* system("echo *") * system("echo *")
@ -4542,9 +4538,9 @@ rb_f_system(int argc, VALUE *argv)
* to finish. * to finish.
* *
* The parent process should * The parent process should
* use <code>Process.wait</code> to collect * use Process.wait to collect
* the termination status of its child or * the termination status of its child or
* use <code>Process.detach</code> to register * use Process.detach to register
* disinterest in their status; * disinterest in their status;
* otherwise, the operating system may accumulate zombie processes. * otherwise, the operating system may accumulate zombie processes.
* *
@ -4674,12 +4670,12 @@ rb_f_system(int argc, VALUE *argv)
* pid = spawn(command, STDERR=>:out) * pid = spawn(command, STDERR=>:out)
* pid = spawn(command, STDERR=>STDOUT) * pid = spawn(command, STDERR=>STDOUT)
* *
* The hash keys specifies a file descriptor * The hash keys specifies a file descriptor in the child process
* in the child process started by <code>spawn</code>. * started by #spawn.
* :err, 2 and STDERR specifies the standard error stream (stderr). * :err, 2 and STDERR specifies the standard error stream (stderr).
* *
* The hash values specifies a file descriptor * The hash values specifies a file descriptor in the parent process
* in the parent process which invokes <code>spawn</code>. * which invokes #spawn.
* :out, 1 and STDOUT specifies the standard output stream (stdout). * :out, 1 and STDOUT specifies the standard output stream (stdout).
* *
* In the above example, * In the above example,
@ -4790,7 +4786,7 @@ rb_f_system(int argc, VALUE *argv)
* Internally, +spawn+ uses an extra file descriptor to resolve such cyclic * Internally, +spawn+ uses an extra file descriptor to resolve such cyclic
* file descriptor mapping. * file descriptor mapping.
* *
* See <code>Kernel.exec</code> for the standard shell. * See Kernel.exec for the standard shell.
*/ */
static VALUE static VALUE
@ -4827,7 +4823,7 @@ rb_f_spawn(int argc, VALUE *argv)
* Suspends the current thread for _duration_ seconds (which may be any number, * Suspends the current thread for _duration_ seconds (which may be any number,
* including a +Float+ with fractional seconds). Returns the actual number of * including a +Float+ with fractional seconds). Returns the actual number of
* seconds slept (rounded), which may be less than that asked for if another * seconds slept (rounded), which may be less than that asked for if another
* thread calls <code>Thread#run</code>. Called without an argument, sleep() * thread calls Thread#run. Called without an argument, sleep()
* will sleep forever. * will sleep forever.
* *
* Time.new #=> 2008-03-08 19:56:19 +0900 * Time.new #=> 2008-03-08 19:56:19 +0900
@ -5063,9 +5059,9 @@ ruby_setsid(void)
* *
* Gets the scheduling priority for specified process, process group, * Gets the scheduling priority for specified process, process group,
* or user. <em>kind</em> indicates the kind of entity to find: one * or user. <em>kind</em> indicates the kind of entity to find: one
* of <code>Process::PRIO_PGRP</code>, * of Process::PRIO_PGRP,
* <code>Process::PRIO_USER</code>, or * Process::PRIO_USER, or
* <code>Process::PRIO_PROCESS</code>. _integer_ is an id * Process::PRIO_PROCESS. _integer_ is an id
* indicating the particular process, process group, or user (an id * indicating the particular process, process group, or user (an id
* of 0 means _current_). Lower priorities are more favorable * of 0 means _current_). Lower priorities are more favorable
* for scheduling. Not available on all platforms. * for scheduling. Not available on all platforms.
@ -5097,7 +5093,7 @@ proc_getpriority(VALUE obj, VALUE which, VALUE who)
* call-seq: * call-seq:
* Process.setpriority(kind, integer, priority) -> 0 * Process.setpriority(kind, integer, priority) -> 0
* *
* See <code>Process#getpriority</code>. * See Process#getpriority.
* *
* Process.setpriority(Process::PRIO_USER, 0, 19) #=> 0 * Process.setpriority(Process::PRIO_USER, 0, 19) #=> 0
* Process.setpriority(Process::PRIO_PROCESS, 0, 19) #=> 0 * Process.setpriority(Process::PRIO_PROCESS, 0, 19) #=> 0
@ -5356,12 +5352,12 @@ rlimit_resource_value(VALUE rval)
* _resource_ indicates the kind of resource to limit. * _resource_ indicates the kind of resource to limit.
* It is specified as a symbol such as <code>:CORE</code>, * It is specified as a symbol such as <code>:CORE</code>,
* a string such as <code>"CORE"</code> or * a string such as <code>"CORE"</code> or
* a constant such as <code>Process::RLIMIT_CORE</code>. * a constant such as Process::RLIMIT_CORE.
* See Process.setrlimit for details. * See Process.setrlimit for details.
* *
* _cur_limit_ and _max_limit_ may be <code>Process::RLIM_INFINITY</code>, * _cur_limit_ and _max_limit_ may be Process::RLIM_INFINITY,
* <code>Process::RLIM_SAVED_MAX</code> or * Process::RLIM_SAVED_MAX or
* <code>Process::RLIM_SAVED_CUR</code>. * Process::RLIM_SAVED_CUR.
* See Process.setrlimit and the system getrlimit(2) manual for details. * See Process.setrlimit and the system getrlimit(2) manual for details.
*/ */
@ -5394,7 +5390,7 @@ proc_getrlimit(VALUE obj, VALUE resource)
* _resource_ indicates the kind of resource to limit. * _resource_ indicates the kind of resource to limit.
* It should be a symbol such as <code>:CORE</code>, * It should be a symbol such as <code>:CORE</code>,
* a string such as <code>"CORE"</code> or * a string such as <code>"CORE"</code> or
* a constant such as <code>Process::RLIMIT_CORE</code>. * a constant such as Process::RLIMIT_CORE.
* The available resources are OS dependent. * The available resources are OS dependent.
* Ruby may support following resources. * Ruby may support following resources.
* *
@ -5417,10 +5413,10 @@ proc_getrlimit(VALUE obj, VALUE resource)
* *
* _cur_limit_ and _max_limit_ may be * _cur_limit_ and _max_limit_ may be
* <code>:INFINITY</code>, <code>"INFINITY"</code> or * <code>:INFINITY</code>, <code>"INFINITY"</code> or
* <code>Process::RLIM_INFINITY</code>, * Process::RLIM_INFINITY,
* which means that the resource is not limited. * which means that the resource is not limited.
* They may be <code>Process::RLIM_SAVED_MAX</code>, * They may be Process::RLIM_SAVED_MAX,
* <code>Process::RLIM_SAVED_CUR</code> and * Process::RLIM_SAVED_CUR and
* corresponding symbols and strings too. * corresponding symbols and strings too.
* See system setrlimit(2) manual for details. * See system setrlimit(2) manual for details.
* *
@ -5477,11 +5473,11 @@ check_gid_switch(void)
/********************************************************************* /*********************************************************************
* Document-class: Process::Sys * Document-class: Process::Sys
* *
* The <code>Process::Sys</code> module contains UID and GID * The Process::Sys module contains UID and GID
* functions which provide direct bindings to the system calls of the * functions which provide direct bindings to the system calls of the
* same names instead of the more-portable versions of the same * same names instead of the more-portable versions of the same
* functionality found in the <code>Process</code>, * functionality found in the Process,
* <code>Process::UID</code>, and <code>Process::GID</code> modules. * Process::UID, and Process::GID modules.
*/ */
#if defined(HAVE_PWD_H) #if defined(HAVE_PWD_H)
@ -5828,7 +5824,7 @@ proc_setuid(VALUE obj, VALUE id)
* *
* Document-class: Process::UID * Document-class: Process::UID
* *
* The <code>Process::UID</code> module contains a collection of * The Process::UID module contains a collection of
* module functions which can be used to portably get, set, and * module functions which can be used to portably get, set, and
* switch the current process's real, effective, and saved user IDs. * switch the current process's real, effective, and saved user IDs.
* *
@ -6283,7 +6279,7 @@ maxgroups(void)
* call-seq: * call-seq:
* Process.groups -> array * Process.groups -> array
* *
* Get an <code>Array</code> of the group IDs in the * Get an Array of the group IDs in the
* supplemental group access list for this process. * supplemental group access list for this process.
* *
* Process.groups #=> [27, 6, 10, 11] * Process.groups #=> [27, 6, 10, 11]
@ -6339,7 +6335,7 @@ proc_getgroups(VALUE obj)
* Process.groups= array -> array * Process.groups= array -> array
* *
* Set the supplemental group access list to the given * Set the supplemental group access list to the given
* <code>Array</code> of group IDs. * Array of group IDs.
* *
* Process.groups #=> [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27] * Process.groups #=> [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27]
* Process.groups = [27, 6, 10, 11] #=> [27, 6, 10, 11] * Process.groups = [27, 6, 10, 11] #=> [27, 6, 10, 11]
@ -6390,7 +6386,7 @@ proc_setgroups(VALUE obj, VALUE ary)
* Initializes the supplemental group access list by reading the * Initializes the supplemental group access list by reading the
* system group database and using all groups of which the given user * system group database and using all groups of which the given user
* is a member. The group with the specified <em>gid</em> is also * is a member. The group with the specified <em>gid</em> is also
* added to the list. Returns the resulting <code>Array</code> of the * added to the list. Returns the resulting Array of the
* gids of all the groups in the supplementary group access list. Not * gids of all the groups in the supplementary group access list. Not
* available on all platforms. * available on all platforms.
* *
@ -6546,7 +6542,7 @@ rb_daemon(int nochdir, int noclose)
* *
* Document-class: Process::GID * Document-class: Process::GID
* *
* The <code>Process::GID</code> module contains a collection of * The Process::GID module contains a collection of
* module functions which can be used to portably get, set, and * module functions which can be used to portably get, set, and
* switch the current process's real, effective, and saved group IDs. * switch the current process's real, effective, and saved group IDs.
* *
@ -7360,7 +7356,7 @@ get_clk_tck(void)
* call-seq: * call-seq:
* Process.times -> aProcessTms * Process.times -> aProcessTms
* *
* Returns a <code>Tms</code> structure (see <code>Process::Tms</code>) * Returns a <code>Tms</code> structure (see Process::Tms)
* that contains user and system CPU times for this process, * that contains user and system CPU times for this process,
* and also for children processes. * and also for children processes.
* *
@ -8048,7 +8044,7 @@ static VALUE rb_mProcID_Syscall;
/* /*
* The <code>Process</code> module is a collection of methods used to * The Process module is a collection of methods used to
* manipulate processes. * manipulate processes.
*/ */

10
range.c
View File

@ -359,8 +359,7 @@ range_step_size(VALUE range, VALUE args, VALUE eobj)
* *
* Iterates over the range, passing each <code>n</code>th element to the block. * Iterates over the range, passing each <code>n</code>th element to the block.
* If begin and end are numeric, +n+ is added for each iteration. * If begin and end are numeric, +n+ is added for each iteration.
* Otherwise <code>step</code> invokes <code>succ</code> to iterate through * Otherwise #step invokes #succ to iterate through range elements.
* range elements.
* *
* If no block is given, an enumerator is returned instead. * If no block is given, an enumerator is returned instead.
* Especially, the enumerator is an Enumerator::ArithmeticSequence * Especially, the enumerator is an Enumerator::ArithmeticSequence
@ -1312,9 +1311,8 @@ inspect_range(VALUE range, VALUE dummy, int recur)
* call-seq: * call-seq:
* rng.inspect -> string * rng.inspect -> string
* *
* Convert this range object to a printable form (using * Convert this range object to a printable form (using #inspect to
* <code>inspect</code> to convert the begin and end * convert the begin and end objects).
* objects).
*/ */
@ -1538,7 +1536,7 @@ range_alloc(VALUE klass)
return rb_struct_alloc_noinit(klass); return rb_struct_alloc_noinit(klass);
} }
/* A <code>Range</code> represents an interval---a set of values with a /* A Range represents an interval---a set of values with a
* beginning and an end. Ranges may be constructed using the * beginning and an end. Ranges may be constructed using the
* <em>s</em><code>..</code><em>e</em> and * <em>s</em><code>..</code><em>e</em> and
* <em>s</em><code>...</code><em>e</em> literals, or with * <em>s</em><code>...</code><em>e</em> literals, or with

82
re.c
View File

@ -521,11 +521,11 @@ static VALUE rb_reg_str_with_term(VALUE re, int term);
* *
* Returns a string containing the regular expression and its options (using the * Returns a string containing the regular expression and its options (using the
* <code>(?opts:source)</code> notation. This string can be fed back in to * <code>(?opts:source)</code> notation. This string can be fed back in to
* <code>Regexp::new</code> to a regular expression with the same semantics as * Regexp::new to a regular expression with the same semantics as the
* the original. (However, <code>Regexp#==</code> may not return true when * original. (However, <code>Regexp#==</code> may not return true
* comparing the two, as the source of the regular expression itself may * when comparing the two, as the source of the regular expression
* differ, as the example shows). <code>Regexp#inspect</code> produces a * itself may differ, as the example shows). Regexp#inspect produces
* generally more readable version of <i>rxp</i>. * a generally more readable version of <i>rxp</i>.
* *
* r1 = /ab+c/ix #=> /ab+c/ix * r1 = /ab+c/ix #=> /ab+c/ix
* s1 = r1.to_s #=> "(?ix-m:ab+c)" * s1 = r1.to_s #=> "(?ix-m:ab+c)"
@ -726,11 +726,11 @@ rb_reg_casefold_p(VALUE re)
* call-seq: * call-seq:
* rxp.options -> integer * rxp.options -> integer
* *
* Returns the set of bits corresponding to the options used when creating this * Returns the set of bits corresponding to the options used when
* Regexp (see <code>Regexp::new</code> for details. Note that additional bits * creating this Regexp (see Regexp::new for details. Note that
* may be set in the returned options: these are used internally by the regular * additional bits may be set in the returned options: these are used
* expression code. These extra bits are ignored if the options are passed to * internally by the regular expression code. These extra bits are
* <code>Regexp::new</code>. * ignored if the options are passed to Regexp::new.
* *
* Regexp::IGNORECASE #=> 1 * Regexp::IGNORECASE #=> 1
* Regexp::EXTENDED #=> 2 * Regexp::EXTENDED #=> 2
@ -884,10 +884,9 @@ make_regexp(const char *s, long len, rb_encoding *enc, int flags, onig_errmsg_bu
/* /*
* Document-class: MatchData * Document-class: MatchData
* *
* <code>MatchData</code> encapsulates the result of matching a Regexp against * MatchData encapsulates the result of matching a Regexp against
* string. It is returned by Regexp#match and * string. It is returned by Regexp#match and String#match, and also
* String#match, and also stored in a global variable returned by * stored in a global variable returned by Regexp.last_match.
* Regexp.last_match.
* *
* Usage: * Usage:
* *
@ -917,16 +916,16 @@ make_regexp(const char *s, long len, rb_encoding *enc, int flags, onig_errmsg_bu
* *
* == Global variables equivalence * == Global variables equivalence
* *
* Parts of last <code>MatchData</code> (returned by Regexp.last_match) are also * Parts of last MatchData (returned by Regexp.last_match) are also
* aliased as global variables: * aliased as global variables:
* *
* * <code>$~</code> is <code>Regexp.last_match</code>; * * <code>$~</code> is Regexp.last_match;
* * <code>$&</code> is <code>Regexp.last_match[0]</code>; * * <code>$&</code> is Regexp.last_match<code>[0]</code>;
* * <code>$1</code>, <code>$2</code>, and so on are * * <code>$1</code>, <code>$2</code>, and so on are
* <code>Regexp.last_match[i]</code> (captures by number); * Regexp.last_match<code>[i]</code> (captures by number);
* * <code>$`</code> is <code>Regexp.last_match.pre_match</code>; * * <code>$`</code> is Regexp.last_match<code>.pre_match</code>;
* * <code>$'</code> is <code>Regexp.last_match.post_match</code>; * * <code>$'</code> is Regexp.last_match<code>.post_match</code>;
* * <code>$+</code> is <code>Regexp.last_match[-1]</code> (the last capture). * * <code>$+</code> is Regexp.last_match<code>[-1]</code> (the last capture).
* *
* See also "Special global variables" section in Regexp documentation. * See also "Special global variables" section in Regexp documentation.
*/ */
@ -2009,12 +2008,12 @@ match_ary_aref(VALUE match, VALUE idx, VALUE result)
* mtch[range] -> array * mtch[range] -> array
* mtch[name] -> str or nil * mtch[name] -> str or nil
* *
* Match Reference -- <code>MatchData</code> acts as an array, and may be * Match Reference -- MatchData acts as an array, and may be accessed
* accessed using the normal array indexing techniques. <code>mtch[0]</code> * using the normal array indexing techniques. <code>mtch[0]</code>
* is equivalent to the special variable <code>$&</code>, and returns the * is equivalent to the special variable <code>$&</code>, and returns
* entire matched string. <code>mtch[1]</code>, <code>mtch[2]</code>, and so * the entire matched string. <code>mtch[1]</code>,
* on return the values of the matched backreferences (portions of the * <code>mtch[2]</code>, and so on return the values of the matched
* pattern between parentheses). * backreferences (portions of the pattern between parentheses).
* *
* m = /(.)(.)(\d+)(\d)/.match("THX1138.") * m = /(.)(.)(\d+)(\d)/.match("THX1138.")
* m #=> #<MatchData "HX1138" 1:"H" 2:"X" 3:"113" 4:"8"> * m #=> #<MatchData "HX1138" 1:"H" 2:"X" 3:"113" 4:"8">
@ -3287,11 +3286,11 @@ rb_reg_match2(VALUE re)
* rxp.match(str) -> matchdata or nil * rxp.match(str) -> matchdata or nil
* rxp.match(str,pos) -> matchdata or nil * rxp.match(str,pos) -> matchdata or nil
* *
* Returns a <code>MatchData</code> object describing the match, or * Returns a MatchData object describing the match, or
* <code>nil</code> if there was no match. This is equivalent to retrieving the * <code>nil</code> if there was no match. This is equivalent to
* value of the special variable <code>$~</code> following a normal match. * retrieving the value of the special variable <code>$~</code>
* If the second parameter is present, it specifies the position in the string * following a normal match. If the second parameter is present, it
* to begin the search. * specifies the position in the string to begin the search.
* *
* /(.)(.)(.)/.match("abc")[2] #=> "b" * /(.)(.)(.)/.match("abc")[2] #=> "b"
* /(.)(.)/.match("abc", 1)[2] #=> "c" * /(.)(.)/.match("abc", 1)[2] #=> "c"
@ -3418,7 +3417,7 @@ rb_reg_match_p(VALUE re, VALUE str, long pos)
/* /*
* Document-method: compile * Document-method: compile
* *
* Alias for <code>Regexp.new</code> * Alias for Regexp.new
*/ */
/* /*
@ -3763,11 +3762,12 @@ rb_reg_s_union(VALUE self, VALUE args0)
* Regexp.union(pat1, pat2, ...) -> new_regexp * Regexp.union(pat1, pat2, ...) -> new_regexp
* Regexp.union(pats_ary) -> new_regexp * Regexp.union(pats_ary) -> new_regexp
* *
* Return a <code>Regexp</code> object that is the union of the given * Return a Regexp object that is the union of the given
* <em>pattern</em>s, i.e., will match any of its parts. The <em>pattern</em>s * <em>pattern</em>s, i.e., will match any of its parts. The
* can be Regexp objects, in which case their options will be preserved, or * <em>pattern</em>s can be Regexp objects, in which case their
* Strings. If no patterns are given, returns <code>/(?!)/</code>. * options will be preserved, or Strings. If no patterns are given,
* The behavior is unspecified if any given <em>pattern</em> contains capture. * returns <code>/(?!)/</code>. The behavior is unspecified if any
* given <em>pattern</em> contains capture.
* *
* Regexp.union #=> /(?!)/ * Regexp.union #=> /(?!)/
* Regexp.union("penzance") #=> /penzance/ * Regexp.union("penzance") #=> /penzance/
@ -4029,9 +4029,9 @@ re_warn(const char *s)
/* /*
* Document-class: Regexp * Document-class: Regexp
* *
* A <code>Regexp</code> holds a regular expression, used to match a pattern * A Regexp holds a regular expression, used to match a pattern
* against strings. Regexps are created using the <code>/.../</code> and * against strings. Regexps are created using the <code>/.../</code>
* <code>%r{...}</code> literals, and by the <code>Regexp::new</code> * and <code>%r{...}</code> literals, and by the Regexp::new
* constructor. * constructor.
* *
* :include: doc/regexp.rdoc * :include: doc/regexp.rdoc

4
ruby.c
View File

@ -1494,7 +1494,7 @@ rb_f_gsub(int argc, VALUE *argv)
* chop -> $_ * chop -> $_
* *
* Equivalent to <code>($_.dup).chop!</code>, except <code>nil</code> * Equivalent to <code>($_.dup).chop!</code>, except <code>nil</code>
* is never returned. See <code>String#chop!</code>. * is never returned. See String#chop!.
* Available only when -p/-n command line option specified. * Available only when -p/-n command line option specified.
* *
*/ */
@ -1514,7 +1514,7 @@ rb_f_chop(void)
* chomp(string) -> $_ * chomp(string) -> $_
* *
* Equivalent to <code>$_ = $_.chomp(<em>string</em>)</code>. See * Equivalent to <code>$_ = $_.chomp(<em>string</em>)</code>. See
* <code>String#chomp</code>. * String#chomp.
* Available only when -p/-n command line option specified. * Available only when -p/-n command line option specified.
* *
*/ */

View File

@ -424,7 +424,7 @@ static void signal_enque(int sig);
* a POSIX signal name (either with or without a +SIG+ prefix). If _signal_ is * a POSIX signal name (either with or without a +SIG+ prefix). If _signal_ is
* negative (or starts with a minus sign), kills process groups instead of * negative (or starts with a minus sign), kills process groups instead of
* processes. Not all signals are available on all platforms. * processes. Not all signals are available on all platforms.
* The keys and values of +Signal.list+ are known signal names and numbers, * The keys and values of Signal.list are known signal names and numbers,
* respectively. * respectively.
* *
* pid = fork do * pid = fork do
@ -439,15 +439,14 @@ static void signal_enque(int sig);
* *
* Ouch! * Ouch!
* *
* If _signal_ is an integer but wrong for signal, * If _signal_ is an integer but wrong for signal, Errno::EINVAL or
* <code>Errno::EINVAL</code> or +RangeError+ will be raised. * RangeError will be raised. Otherwise unless _signal_ is a String
* Otherwise unless _signal_ is a +String+ or a +Symbol+, and a known * or a Symbol, and a known signal name, ArgumentError will be
* signal name, +ArgumentError+ will be raised. * raised.
* *
* Also, <code>Errno::ESRCH</code> or +RangeError+ for invalid _pid_, * Also, Errno::ESRCH or RangeError for invalid _pid_, Errno::EPERM
* <code>Errno::EPERM</code> when failed because of no privilege, * when failed because of no privilege, will be raised. In these
* will be raised. In these cases, signals may have been sent to * cases, signals may have been sent to preceding processes.
* preceding processes.
*/ */
VALUE VALUE

View File

@ -679,8 +679,8 @@ rb_gc_free_dsymbol(VALUE sym)
* str.intern -> symbol * str.intern -> symbol
* str.to_sym -> symbol * str.to_sym -> symbol
* *
* Returns the <code>Symbol</code> corresponding to <i>str</i>, creating the * Returns the Symbol corresponding to <i>str</i>, creating the
* symbol if it did not previously exist. See <code>Symbol#id2name</code>. * symbol if it did not previously exist. See Symbol#id2name.
* *
* "Koala".intern #=> :Koala * "Koala".intern #=> :Koala
* s = 'cat'.to_sym #=> :cat * s = 'cat'.to_sym #=> :cat

View File

@ -3255,10 +3255,10 @@ rb_thread_aref(VALUE thread, VALUE key)
* *
* Returns a fiber-local for the given key. If the key can't be * Returns a fiber-local for the given key. If the key can't be
* found, there are several options: With no other arguments, it will * found, there are several options: With no other arguments, it will
* raise a <code>KeyError</code> exception; if <i>default</i> is * raise a KeyError exception; if <i>default</i> is given, then that
* given, then that will be returned; if the optional code block is * will be returned; if the optional code block is specified, then
* specified, then that will be run and its result returned. * that will be run and its result returned. See Thread#[] and
* See Thread#[] and Hash#fetch. * Hash#fetch.
*/ */
static VALUE static VALUE
rb_thread_fetch(int argc, VALUE *argv, VALUE self) rb_thread_fetch(int argc, VALUE *argv, VALUE self)

View File

@ -719,7 +719,7 @@ rb_trace_eval(VALUE cmd, VALUE val)
* +Proc+ object) or block is executed whenever the variable * +Proc+ object) or block is executed whenever the variable
* is assigned. The block or +Proc+ object receives the * is assigned. The block or +Proc+ object receives the
* variable's new value as a parameter. Also see * variable's new value as a parameter. Also see
* <code>Kernel::untrace_var</code>. * Kernel::untrace_var.
* *
* trace_var :$_, proc {|v| puts "$_ is now '#{v}'" } * trace_var :$_, proc {|v| puts "$_ is now '#{v}'" }
* $_ = "hello" * $_ = "hello"
@ -2738,7 +2738,7 @@ rb_const_list(void *data)
* IO.constants.include?(:SYNC) #=> true * IO.constants.include?(:SYNC) #=> true
* IO.constants(false).include?(:SYNC) #=> false * IO.constants(false).include?(:SYNC) #=> false
* *
* Also see <code>Module::const_defined?</code>. * Also see Module::const_defined?.
*/ */
VALUE VALUE

View File

@ -1357,10 +1357,10 @@ eval_string_with_scope(VALUE scope, VALUE src, VALUE file, int line)
* eval(string [, binding [, filename [,lineno]]]) -> obj * eval(string [, binding [, filename [,lineno]]]) -> obj
* *
* Evaluates the Ruby expression(s) in <em>string</em>. If * Evaluates the Ruby expression(s) in <em>string</em>. If
* <em>binding</em> is given, which must be a <code>Binding</code> * <em>binding</em> is given, which must be a Binding object, the
* object, the evaluation is performed in its context. If the * evaluation is performed in its context. If the optional
* optional <em>filename</em> and <em>lineno</em> parameters are * <em>filename</em> and <em>lineno</em> parameters are present, they
* present, they will be used when reporting syntax errors. * will be used when reporting syntax errors.
* *
* def get_binding(str) * def get_binding(str)
* return binding * return binding
@ -1850,7 +1850,7 @@ uncaught_throw_to_s(VALUE exc)
* is no +catch+ block for the _tag_. The optional second * is no +catch+ block for the _tag_. The optional second
* parameter supplies a return value for the +catch+ block, * parameter supplies a return value for the +catch+ block,
* which otherwise defaults to +nil+. For examples, see * which otherwise defaults to +nil+. For examples, see
* <code>Kernel::catch</code>. * Kernel::catch.
*/ */
static VALUE static VALUE

View File

@ -1031,7 +1031,7 @@ rb_remove_method(VALUE klass, const char *name)
* remove_method(string) -> self * remove_method(string) -> self
* *
* Removes the method identified by _symbol_ from the current * Removes the method identified by _symbol_ from the current
* class. For an example, see <code>Module.undef_method</code>. * class. For an example, see Module.undef_method.
* String arguments are converted to symbols. * String arguments are converted to symbols.
*/ */