summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pack.c6
-rw-r--r--proc.c102
-rw-r--r--process.c134
-rw-r--r--range.c10
-rw-r--r--re.c82
-rw-r--r--ruby.c4
-rw-r--r--signal.c17
-rw-r--r--symbol.c4
-rw-r--r--thread.c8
-rw-r--r--variable.c4
-rw-r--r--vm_eval.c10
-rw-r--r--vm_method.c2
12 files changed, 186 insertions, 197 deletions
diff --git a/pack.c b/pack.c
index b1efef54f1..3305ccaa1e 100644
--- a/pack.c
+++ b/pack.c
@@ -186,7 +186,7 @@ VALUE_to_float(VALUE obj)
* exclamation mark (``<code>!</code>'') to use the underlying
* platform's native size for the specified type; otherwise, they use a
* 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" ]
* 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
* platform's native size for the specified type; otherwise, it uses a
* 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\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
* 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
diff --git a/proc.c b/proc.c
index 20efadc4ef..e63b8469ac 100644
--- a/proc.c
+++ b/proc.c
@@ -755,10 +755,10 @@ proc_new(VALUE klass, int8_t is_lambda)
* Proc.new {|...| block } -> a_proc
* Proc.new -> a_proc
*
- * Creates a new <code>Proc</code> object, bound to the current
- * context. <code>Proc::new</code> may be called without a block only
- * within a method with an attached block, in which case that block is
- * converted to the <code>Proc</code> object.
+ * Creates a new Proc object, bound to the current context. Proc::new
+ * may be called without a block only within a method with an
+ * attached block, in which case that block is converted to the Proc
+ * object.
*
* def proc_from
* Proc.new
@@ -780,7 +780,7 @@ rb_proc_s_new(int argc, VALUE *argv, VALUE klass)
* call-seq:
* proc { |...| block } -> a_proc
*
- * Equivalent to <code>Proc.new</code>.
+ * Equivalent to Proc.new.
*/
VALUE
@@ -793,8 +793,8 @@ rb_block_proc(void)
* call-seq:
* lambda { |...| block } -> a_proc
*
- * Equivalent to <code>Proc.new</code>, except the resulting Proc objects
- * check the number of parameters passed when called.
+ * Equivalent to Proc.new, except the resulting Proc objects check the
+ * number of parameters passed when called.
*/
VALUE
@@ -839,11 +839,11 @@ rb_block_lambda(void)
* Note that <code>prc.()</code> invokes <code>prc.call()</code> with
* the parameters given. It's syntactic sugar to hide "call".
*
- * For procs created using <code>lambda</code> or <code>->()</code> an error
- * is generated if the wrong number of parameters are passed to the proc.
- * For procs created using <code>Proc.new</code> or <code>Kernel.proc</code>,
- * extra parameters are silently discarded and missing parameters are
- * set to +nil+.
+ * For procs created using #lambda or <code>->()</code> an error is
+ * generated if the wrong number of parameters are passed to the
+ * proc. For procs created using Proc.new or Kernel.proc, extra
+ * parameters are silently discarded and missing parameters are set
+ * to +nil+.
*
* a_proc = proc {|a,b| [a,b] }
* 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.
* Keyword arguments will be considered as a single additional argument,
* that argument being mandatory if any keyword argument is mandatory.
- * A <code>proc</code> with no argument declarations
- * is the same as a block declaring <code>||</code> as its arguments.
+ * A #proc with no argument declarations is the same as a block
+ * declaring <code>||</code> as its arguments.
*
* proc {}.arity #=> 0
* proc { || }.arity #=> 0
@@ -1302,9 +1302,8 @@ proc_to_s(VALUE self)
* call-seq:
* prc.to_proc -> proc
*
- * Part of the protocol for converting objects to <code>Proc</code>
- * objects. Instances of class <code>Proc</code> simply return
- * themselves.
+ * Part of the protocol for converting objects to Proc objects.
+ * Instances of class Proc simply return themselves.
*/
static VALUE
@@ -1476,12 +1475,11 @@ method_entry_defined_class(const rb_method_entry_t *me)
*
* Document-class: Method
*
- * Method objects are created by <code>Object#method</code>, and are
- * associated with a particular object (not just with a class). They
- * may be used to invoke the method within the object, and as a block
- * associated with an iterator. They may also be unbound from one
- * object (creating an <code>UnboundMethod</code>) and bound to
- * another.
+ * Method objects are created by Object#method, and are associated
+ * with a particular object (not just with a class). They may be
+ * used to invoke the method within the object, and as a block
+ * associated with an iterator. They may also be unbound from one
+ * object (creating an UnboundMethod) and bound to another.
*
* class Thing
* def square(n)
@@ -1567,8 +1565,8 @@ method_hash(VALUE method)
* meth.unbind -> unbound_method
*
* Dissociates <i>meth</i> from its current receiver. The resulting
- * <code>UnboundMethod</code> can subsequently be bound to a new object
- * of the same class (see <code>UnboundMethod</code>).
+ * UnboundMethod can subsequently be bound to a new object of the
+ * same class (see UnboundMethod).
*/
static VALUE
@@ -1711,10 +1709,9 @@ obj_method(VALUE obj, VALUE vid, int scope)
* obj.method(sym) -> method
*
* Looks up the named method as a receiver in <i>obj</i>, returning a
- * <code>Method</code> object (or raising <code>NameError</code>). The
- * <code>Method</code> object acts as a closure in <i>obj</i>'s object
- * instance, so instance variables and the value of <code>self</code>
- * remain available.
+ * Method object (or raising NameError). The Method object acts as a
+ * closure in <i>obj</i>'s object instance, so instance variables and
+ * the value of <code>self</code> remain available.
*
* class Demo
* def initialize(n)
@@ -1733,8 +1730,8 @@ obj_method(VALUE obj, VALUE vid, int scope)
* m = l.method("hello")
* m.call #=> "Hello, @iv = Fred"
*
- * Note that <code>Method</code> implements <code>to_proc</code> method,
- * which means it can be used with iterators.
+ * Note that Method implements <code>to_proc</code> method, which
+ * means it can be used with iterators.
*
* [ 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_
* 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
- * is evaluated using <code>instance_eval</code>.
+ * is evaluated using #instance_eval.
*
* class A
* def fred
@@ -2190,17 +2187,16 @@ rb_method_call_with_block(int argc, const VALUE *argv, VALUE method, VALUE passe
*
* Document-class: UnboundMethod
*
- * Ruby supports two forms of objectified methods. Class
- * <code>Method</code> is used to represent methods that are associated
- * with a particular object: these method objects are bound to that
- * object. Bound method objects for an object can be created using
- * <code>Object#method</code>.
+ * Ruby supports two forms of objectified methods. Class Method is
+ * used to represent methods that are associated with a particular
+ * object: these method objects are bound to that object. Bound
+ * method objects for an object can be created using Object#method.
*
* Ruby also supports unbound methods; methods objects that are not
- * associated with a particular object. These can be created either by
- * calling <code>Module#instance_method</code> or by calling
- * <code>unbind</code> on a bound method object. The result of both of
- * these is an <code>UnboundMethod</code> object.
+ * associated with a particular object. These can be created either
+ * by calling Module#instance_method or by calling #unbind on a bound
+ * method object. The result of both of these is an UnboundMethod
+ * object.
*
* Unbound methods can only be called after they are bound to an
* 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:
* umeth.bind(obj) -> method
*
- * Bind <i>umeth</i> to <i>obj</i>. If <code>Klass</code> was the class
- * from which <i>umeth</i> was obtained,
- * <code>obj.kind_of?(Klass)</code> must be true.
+ * Bind <i>umeth</i> to <i>obj</i>. If Klass was the class from which
+ * <i>umeth</i> was obtained, <code>obj.kind_of?(Klass)</code> must
+ * be true.
*
* class A
* def test
@@ -2725,7 +2721,7 @@ rb_proc_new(
* call-seq:
* meth.to_proc -> proc
*
- * Returns a <code>Proc</code> object corresponding to this method.
+ * Returns a Proc object corresponding to this method.
*/
static VALUE
@@ -3399,7 +3395,7 @@ rb_method_compose_to_right(VALUE self, VALUE g)
* end
* 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.
*
* == Conversion of other objects to procs
@@ -3552,16 +3548,16 @@ Init_Proc(void)
}
/*
- * Objects of class <code>Binding</code> encapsulate the execution
- * context at some particular place in the code and retain this context
- * for future use. The variables, methods, value of <code>self</code>,
- * and possibly an iterator block that can be accessed in this context
+ * Objects of class Binding encapsulate the execution context at some
+ * particular place in the code and retain this context for future
+ * use. The variables, methods, value of <code>self</code>, and
+ * possibly an iterator block that can be accessed in this context
* are all retained. Binding objects can be created using
- * <code>Kernel#binding</code>, and are made available to the callback
- * of <code>Kernel#set_trace_func</code>.
+ * Kernel#binding, and are made available to the callback of
+ * Kernel#set_trace_func.
*
* 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.
*
* class Demo
diff --git a/process.c b/process.c
index b02fa59e42..87780f74bd 100644
--- a/process.c
+++ b/process.c
@@ -463,10 +463,10 @@ get_ppid(void)
*
* 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
* variable <code>$?</code> is either +nil+ or a
- * <code>Process::Status</code> object.
+ * Process::Status object.
*
* fork { exit 99 } #=> 26557
* Process.wait #=> 26557
@@ -483,7 +483,7 @@ get_ppid(void)
* information (for example the program's return code in the case of
* exited processes). Pre Ruby 1.8, these bits were exposed directly
* 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
* descriptions that follow, when we talk about the integer value of
* _stat_, we're referring to this 16 bit value.
@@ -538,7 +538,7 @@ rb_last_status_clear(void)
* stat.to_i -> 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.
*
* fork { exit 0xab } #=> 26566
@@ -736,9 +736,9 @@ pst_rshift(VALUE st1, VALUE st2)
* call-seq:
* stat.stopped? -> true or false
*
- * Returns +true+ if this process is stopped. This is only
- * returned if the corresponding <code>wait</code> call had the
- * <code>WUNTRACED</code> flag set.
+ * Returns +true+ if this process is stopped. This is only returned
+ * if the corresponding #wait call had the Process::WUNTRACED flag
+ * set.
*/
static VALUE
@@ -838,8 +838,7 @@ pst_wifexited(VALUE st)
* stat.exitstatus -> integer or nil
*
* Returns the least significant eight bits of the return code of
- * _stat_. Only available if <code>exited?</code> is
- * +true+.
+ * _stat_. Only available if #exited? is +true+.
*
* fork { } #=> 26572
* Process.wait #=> 26572
@@ -868,7 +867,7 @@ pst_wexitstatus(VALUE st)
* stat.success? -> true, false or nil
*
* 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
@@ -1241,7 +1240,7 @@ rb_waitpid(rb_pid_t pid, int *st, int flags)
* Process.waitpid(pid=-1, flags=0) -> integer
*
* 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
* depends on the value of _pid_:
*
@@ -1257,8 +1256,8 @@ rb_waitpid(rb_pid_t pid, int *st, int flags)
* value of _pid_.
*
* The _flags_ argument may be a logical or of the flag values
- * <code>Process::WNOHANG</code> (do not block if no child available)
- * or <code>Process::WUNTRACED</code> (return stopped children that
+ * Process::WNOHANG (do not block if no child available)
+ * or Process::WUNTRACED (return stopped children that
* haven't been reported). Not all flags are available on all
* 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
* 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.
*
* Process.fork { exit 99 } #=> 27437
@@ -1336,7 +1335,7 @@ proc_wait2(int argc, VALUE *argv)
*
* Waits for all children, returning an array of
* _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.1; exit 1 } #=> 27433
@@ -1411,18 +1410,17 @@ rb_detach_process(rb_pid_t pid)
* processes until the parent collects that status (normally using
* some variant of <code>wait()</code>). If the parent never collects
* this status, the child stays around as a <em>zombie</em> process.
- * <code>Process::detach</code> prevents this by setting up a
- * separate Ruby thread whose sole job is to reap the status of the
- * process _pid_ when it terminates. Use <code>detach</code>
- * only when you do not intend to explicitly wait for the child to
- * terminate.
+ * Process::detach prevents this by setting up a separate Ruby thread
+ * whose sole job is to reap the status of the process _pid_ when it
+ * terminates. Use #detach only when you do not intend to explicitly
+ * wait for the child to terminate.
*
* 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
* 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
* it appears as a zombie in the process status display.
@@ -1437,7 +1435,7 @@ rb_detach_process(rb_pid_t pid)
*
* 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.
*
* 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
* ::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.
*
* 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
* in the subprocess, and the subprocess terminates with a status of
- * zero. Otherwise, the +fork+ call returns twice, once in
- * the parent, returning the process ID of the child, and once in
- * the child, returning _nil_. The child process can exit using
- * <code>Kernel.exit!</code> to avoid running any
- * <code>at_exit</code> functions. The parent process should
- * use <code>Process.wait</code> to collect the termination statuses
- * of its children or use <code>Process.detach</code> to register
- * disinterest in their status; otherwise, the operating system
- * may accumulate zombie processes.
+ * zero. Otherwise, the +fork+ call returns twice, once in the
+ * parent, returning the process ID of the child, and once in the
+ * child, returning _nil_. The child process can exit using
+ * Kernel.exit! to avoid running any <code>at_exit</code>
+ * functions. The parent process should use Process.wait to collect
+ * the termination statuses of its children or use Process.detach to
+ * register disinterest in their status; otherwise, the operating
+ * system may accumulate zombie processes.
*
* The thread calling fork is the only thread in the created child process.
* fork doesn't copy other threads.
@@ -4189,7 +4186,7 @@ rb_exit(int status)
* Process::exit(status=true)
*
* 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
* environment.
* +true+ and +FALSE+ of _status_ means success and failure
@@ -4209,9 +4206,9 @@ rb_exit(int status)
* rescued a SystemExit exception
* after begin block
*
- * Just prior to termination, Ruby executes any <code>at_exit</code> functions
- * (see Kernel::at_exit) and runs any object finalizers (see
- * ObjectSpace::define_finalizer).
+ * Just prior to termination, Ruby executes any <code>at_exit</code>
+ * functions (see Kernel::at_exit) and runs any object finalizers
+ * (see ObjectSpace::define_finalizer).
*
* at_exit { puts "at_exit function" }
* 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
* for Kernel#spawn.
*
- * The hash arguments, env and options, are same as
- * <code>exec</code> and <code>spawn</code>.
+ * The hash arguments, env and options, are same as #exec and #spawn.
* See Kernel#spawn for details.
*
* system("echo *")
@@ -4542,9 +4538,9 @@ rb_f_system(int argc, VALUE *argv)
* to finish.
*
* The parent process should
- * use <code>Process.wait</code> to collect
+ * use Process.wait to collect
* the termination status of its child or
- * use <code>Process.detach</code> to register
+ * use Process.detach to register
* disinterest in their status;
* 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=>STDOUT)
*
- * The hash keys specifies a file descriptor
- * in the child process started by <code>spawn</code>.
+ * The hash keys specifies a file descriptor in the child process
+ * started by #spawn.
* :err, 2 and STDERR specifies the standard error stream (stderr).
*
- * The hash values specifies a file descriptor
- * in the parent process which invokes <code>spawn</code>.
+ * The hash values specifies a file descriptor in the parent process
+ * which invokes #spawn.
* :out, 1 and STDOUT specifies the standard output stream (stdout).
*
* 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
* file descriptor mapping.
*
- * See <code>Kernel.exec</code> for the standard shell.
+ * See Kernel.exec for the standard shell.
*/
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,
* including a +Float+ with fractional seconds). Returns the actual number of
* 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.
*
* 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,
* or user. <em>kind</em> indicates the kind of entity to find: one
- * of <code>Process::PRIO_PGRP</code>,
- * <code>Process::PRIO_USER</code>, or
- * <code>Process::PRIO_PROCESS</code>. _integer_ is an id
+ * of Process::PRIO_PGRP,
+ * Process::PRIO_USER, or
+ * Process::PRIO_PROCESS. _integer_ is an id
* indicating the particular process, process group, or user (an id
* of 0 means _current_). Lower priorities are more favorable
* for scheduling. Not available on all platforms.
@@ -5097,7 +5093,7 @@ proc_getpriority(VALUE obj, VALUE which, VALUE who)
* call-seq:
* 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_PROCESS, 0, 19) #=> 0
@@ -5356,12 +5352,12 @@ rlimit_resource_value(VALUE rval)
* _resource_ indicates the kind of resource to limit.
* It is specified as a symbol such as <code>:CORE</code>,
* 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.
*
- * _cur_limit_ and _max_limit_ may be <code>Process::RLIM_INFINITY</code>,
- * <code>Process::RLIM_SAVED_MAX</code> or
- * <code>Process::RLIM_SAVED_CUR</code>.
+ * _cur_limit_ and _max_limit_ may be Process::RLIM_INFINITY,
+ * Process::RLIM_SAVED_MAX or
+ * Process::RLIM_SAVED_CUR.
* 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.
* It should be a symbol such as <code>:CORE</code>,
* 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.
* Ruby may support following resources.
*
@@ -5417,10 +5413,10 @@ proc_getrlimit(VALUE obj, VALUE resource)
*
* _cur_limit_ and _max_limit_ may be
* <code>:INFINITY</code>, <code>"INFINITY"</code> or
- * <code>Process::RLIM_INFINITY</code>,
+ * Process::RLIM_INFINITY,
* which means that the resource is not limited.
- * They may be <code>Process::RLIM_SAVED_MAX</code>,
- * <code>Process::RLIM_SAVED_CUR</code> and
+ * They may be Process::RLIM_SAVED_MAX,
+ * Process::RLIM_SAVED_CUR and
* corresponding symbols and strings too.
* See system setrlimit(2) manual for details.
*
@@ -5477,11 +5473,11 @@ check_gid_switch(void)
/*********************************************************************
* 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
* same names instead of the more-portable versions of the same
- * functionality found in the <code>Process</code>,
- * <code>Process::UID</code>, and <code>Process::GID</code> modules.
+ * functionality found in the Process,
+ * Process::UID, and Process::GID modules.
*/
#if defined(HAVE_PWD_H)
@@ -5828,7 +5824,7 @@ proc_setuid(VALUE obj, VALUE id)
*
* 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
* switch the current process's real, effective, and saved user IDs.
*
@@ -6283,7 +6279,7 @@ maxgroups(void)
* call-seq:
* 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.
*
* Process.groups #=> [27, 6, 10, 11]
@@ -6339,7 +6335,7 @@ proc_getgroups(VALUE obj)
* Process.groups= array -> array
*
* 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 = [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
* 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
- * 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
* available on all platforms.
*
@@ -6546,7 +6542,7 @@ rb_daemon(int nochdir, int noclose)
*
* 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
* switch the current process's real, effective, and saved group IDs.
*
@@ -7360,7 +7356,7 @@ get_clk_tck(void)
* call-seq:
* 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,
* 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.
*/
diff --git a/range.c b/range.c
index 3f87e7e268..22cf237fc1 100644
--- a/range.c
+++ b/range.c
@@ -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.
* If begin and end are numeric, +n+ is added for each iteration.
- * Otherwise <code>step</code> invokes <code>succ</code> to iterate through
- * range elements.
+ * Otherwise #step invokes #succ to iterate through range elements.
*
* If no block is given, an enumerator is returned instead.
* Especially, the enumerator is an Enumerator::ArithmeticSequence
@@ -1312,9 +1311,8 @@ inspect_range(VALUE range, VALUE dummy, int recur)
* call-seq:
* rng.inspect -> string
*
- * Convert this range object to a printable form (using
- * <code>inspect</code> to convert the begin and end
- * objects).
+ * Convert this range object to a printable form (using #inspect to
+ * convert the begin and end objects).
*/
@@ -1538,7 +1536,7 @@ range_alloc(VALUE 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
* <em>s</em><code>..</code><em>e</em> and
* <em>s</em><code>...</code><em>e</em> literals, or with
diff --git a/re.c b/re.c
index 88d051904f..4c18e5315c 100644
--- a/re.c
+++ b/re.c
@@ -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
* <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
- * the original. (However, <code>Regexp#==</code> may not return true when
- * comparing the two, as the source of the regular expression itself may
- * differ, as the example shows). <code>Regexp#inspect</code> produces a
- * generally more readable version of <i>rxp</i>.
+ * Regexp::new to a regular expression with the same semantics as the
+ * original. (However, <code>Regexp#==</code> may not return true
+ * when comparing the two, as the source of the regular expression
+ * itself may differ, as the example shows). Regexp#inspect produces
+ * a generally more readable version of <i>rxp</i>.
*
* r1 = /ab+c/ix #=> /ab+c/ix
* s1 = r1.to_s #=> "(?ix-m:ab+c)"
@@ -726,11 +726,11 @@ rb_reg_casefold_p(VALUE re)
* call-seq:
* rxp.options -> integer
*
- * Returns the set of bits corresponding to the options used when creating this
- * Regexp (see <code>Regexp::new</code> for details. Note that additional bits
- * may be set in the returned options: these are used internally by the regular
- * expression code. These extra bits are ignored if the options are passed to
- * <code>Regexp::new</code>.
+ * Returns the set of bits corresponding to the options used when
+ * creating this Regexp (see Regexp::new for details. Note that
+ * additional bits may be set in the returned options: these are used
+ * internally by the regular expression code. These extra bits are
+ * ignored if the options are passed to Regexp::new.
*
* Regexp::IGNORECASE #=> 1
* 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
*
- * <code>MatchData</code> encapsulates the result of matching a Regexp against
- * string. It is returned by Regexp#match and
- * String#match, and also stored in a global variable returned by
- * Regexp.last_match.
+ * MatchData encapsulates the result of matching a Regexp against
+ * string. It is returned by Regexp#match and String#match, and also
+ * stored in a global variable returned by Regexp.last_match.
*
* Usage:
*
@@ -917,16 +916,16 @@ make_regexp(const char *s, long len, rb_encoding *enc, int flags, onig_errmsg_bu
*
* == 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:
*
- * * <code>$~</code> is <code>Regexp.last_match</code>;
- * * <code>$&</code> is <code>Regexp.last_match[0]</code>;
+ * * <code>$~</code> is Regexp.last_match;
+ * * <code>$&</code> is Regexp.last_match<code>[0]</code>;
* * <code>$1</code>, <code>$2</code>, and so on are
- * <code>Regexp.last_match[i]</code> (captures by number);
- * * <code>$`</code> is <code>Regexp.last_match.pre_match</code>;
- * * <code>$'</code> is <code>Regexp.last_match.post_match</code>;
- * * <code>$+</code> is <code>Regexp.last_match[-1]</code> (the last capture).
+ * Regexp.last_match<code>[i]</code> (captures by number);
+ * * <code>$`</code> is Regexp.last_match<code>.pre_match</code>;
+ * * <code>$'</code> is Regexp.last_match<code>.post_match</code>;
+ * * <code>$+</code> is Regexp.last_match<code>[-1]</code> (the last capture).
*
* 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[name] -> str or nil
*
- * Match Reference -- <code>MatchData</code> acts as an array, and may be
- * accessed using the normal array indexing techniques. <code>mtch[0]</code>
- * is equivalent to the special variable <code>$&</code>, and returns the
- * entire matched string. <code>mtch[1]</code>, <code>mtch[2]</code>, and so
- * on return the values of the matched backreferences (portions of the
- * pattern between parentheses).
+ * Match Reference -- MatchData acts as an array, and may be accessed
+ * using the normal array indexing techniques. <code>mtch[0]</code>
+ * is equivalent to the special variable <code>$&</code>, and returns
+ * the entire matched string. <code>mtch[1]</code>,
+ * <code>mtch[2]</code>, and so on return the values of the matched
+ * backreferences (portions of the pattern between parentheses).
*
* m = /(.)(.)(\d+)(\d)/.match("THX1138.")
* 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,pos) -> matchdata or nil
*
- * Returns a <code>MatchData</code> object describing the match, or
- * <code>nil</code> if there was no match. This is equivalent to retrieving the
- * value of the special variable <code>$~</code> following a normal match.
- * If the second parameter is present, it specifies the position in the string
- * to begin the search.
+ * Returns a MatchData object describing the match, or
+ * <code>nil</code> if there was no match. This is equivalent to
+ * retrieving the value of the special variable <code>$~</code>
+ * following a normal match. If the second parameter is present, it
+ * specifies the position in the string to begin the search.
*
* /(.)(.)(.)/.match("abc")[2] #=> "b"
* /(.)(.)/.match("abc", 1)[2] #=> "c"
@@ -3418,7 +3417,7 @@ rb_reg_match_p(VALUE re, VALUE str, long pos)
/*
* 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(pats_ary) -> new_regexp
*
- * Return a <code>Regexp</code> 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
- * can be Regexp objects, in which case their options will be preserved, or
- * Strings. If no patterns are given, returns <code>/(?!)/</code>.
- * The behavior is unspecified if any given <em>pattern</em> contains capture.
+ * 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 can be Regexp objects, in which case their
+ * options will be preserved, or Strings. If no patterns are given,
+ * returns <code>/(?!)/</code>. The behavior is unspecified if any
+ * given <em>pattern</em> contains capture.
*
* Regexp.union #=> /(?!)/
* Regexp.union("penzance") #=> /penzance/
@@ -4029,9 +4029,9 @@ re_warn(const char *s)
/*
* Document-class: Regexp
*
- * A <code>Regexp</code> holds a regular expression, used to match a pattern
- * against strings. Regexps are created using the <code>/.../</code> and
- * <code>%r{...}</code> literals, and by the <code>Regexp::new</code>
+ * A Regexp holds a regular expression, used to match a pattern
+ * against strings. Regexps are created using the <code>/.../</code>
+ * and <code>%r{...}</code> literals, and by the Regexp::new
* constructor.
*
* :include: doc/regexp.rdoc
diff --git a/ruby.c b/ruby.c
index d6456272a1..86965e1bdf 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1494,7 +1494,7 @@ rb_f_gsub(int argc, VALUE *argv)
* chop -> $_
*
* 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.
*
*/
@@ -1514,7 +1514,7 @@ rb_f_chop(void)
* chomp(string) -> $_
*
* Equivalent to <code>$_ = $_.chomp(<em>string</em>)</code>. See
- * <code>String#chomp</code>.
+ * String#chomp.
* Available only when -p/-n command line option specified.
*
*/
diff --git a/signal.c b/signal.c
index 631fdae4e0..fffc65ce0c 100644
--- a/signal.c
+++ b/signal.c
@@ -424,7 +424,7 @@ static void signal_enque(int sig);
* 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
* 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.
*
* pid = fork do
@@ -439,15 +439,14 @@ static void signal_enque(int sig);
*
* Ouch!
*
- * 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
- * signal name, +ArgumentError+ will be raised.
+ * If _signal_ is an integer but wrong for signal, Errno::EINVAL or
+ * RangeError will be raised. Otherwise unless _signal_ is a String
+ * or a Symbol, and a known 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,
- * will be raised. In these cases, signals may have been sent to
- * preceding processes.
+ * Also, Errno::ESRCH or RangeError for invalid _pid_, Errno::EPERM
+ * when failed because of no privilege, will be raised. In these
+ * cases, signals may have been sent to preceding processes.
*/
VALUE
diff --git a/symbol.c b/symbol.c
index ae6003ef15..09fe7ecb33 100644
--- a/symbol.c
+++ b/symbol.c
@@ -679,8 +679,8 @@ rb_gc_free_dsymbol(VALUE sym)
* str.intern -> symbol
* str.to_sym -> symbol
*
- * Returns the <code>Symbol</code> corresponding to <i>str</i>, creating the
- * symbol if it did not previously exist. See <code>Symbol#id2name</code>.
+ * Returns the Symbol corresponding to <i>str</i>, creating the
+ * symbol if it did not previously exist. See Symbol#id2name.
*
* "Koala".intern #=> :Koala
* s = 'cat'.to_sym #=> :cat
diff --git a/thread.c b/thread.c
index 59935a2e1c..213a3e5fb7 100644
--- a/thread.c
+++ b/thread.c
@@ -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
* found, there are several options: With no other arguments, it will
- * raise a <code>KeyError</code> exception; if <i>default</i> is
- * given, then that will be returned; if the optional code block is
- * specified, then that will be run and its result returned.
- * See Thread#[] and Hash#fetch.
+ * raise a KeyError exception; if <i>default</i> is given, then that
+ * will be returned; if the optional code block is specified, then
+ * that will be run and its result returned. See Thread#[] and
+ * Hash#fetch.
*/
static VALUE
rb_thread_fetch(int argc, VALUE *argv, VALUE self)
diff --git a/variable.c b/variable.c
index c3dd54d5f2..ad7069ece0 100644
--- a/variable.c
+++ b/variable.c
@@ -719,7 +719,7 @@ rb_trace_eval(VALUE cmd, VALUE val)
* +Proc+ object) or block is executed whenever the variable
* is assigned. The block or +Proc+ object receives the
* 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}'" }
* $_ = "hello"
@@ -2738,7 +2738,7 @@ rb_const_list(void *data)
* IO.constants.include?(:SYNC) #=> true
* IO.constants(false).include?(:SYNC) #=> false
*
- * Also see <code>Module::const_defined?</code>.
+ * Also see Module::const_defined?.
*/
VALUE
diff --git a/vm_eval.c b/vm_eval.c
index c537ecce31..a4d5835720 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -1357,10 +1357,10 @@ eval_string_with_scope(VALUE scope, VALUE src, VALUE file, int line)
* eval(string [, binding [, filename [,lineno]]]) -> obj
*
* Evaluates the Ruby expression(s) in <em>string</em>. If
- * <em>binding</em> is given, which must be a <code>Binding</code>
- * object, the evaluation is performed in its context. If the
- * optional <em>filename</em> and <em>lineno</em> parameters are
- * present, they will be used when reporting syntax errors.
+ * <em>binding</em> is given, which must be a Binding object, the
+ * evaluation is performed in its context. If the optional
+ * <em>filename</em> and <em>lineno</em> parameters are present, they
+ * will be used when reporting syntax errors.
*
* def get_binding(str)
* return binding
@@ -1850,7 +1850,7 @@ uncaught_throw_to_s(VALUE exc)
* is no +catch+ block for the _tag_. The optional second
* parameter supplies a return value for the +catch+ block,
* which otherwise defaults to +nil+. For examples, see
- * <code>Kernel::catch</code>.
+ * Kernel::catch.
*/
static VALUE
diff --git a/vm_method.c b/vm_method.c
index fcb9f1967e..aa66615fe9 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -1031,7 +1031,7 @@ rb_remove_method(VALUE klass, const char *name)
* remove_method(string) -> self
*
* 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.
*/