summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-17 21:31:22 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-17 21:31:22 +0000
commitc1ecff1b1e2eb1c4a10e305dd6cc25d7a94436f6 (patch)
treeb89029a472c274adcef054d03a694fd5905780cf
parentef83d7a928ef9d998dc9cf9cb86649cdd9ffceea (diff)
* hash.c: Documentation: change => in call-seq to ->.
* enum.c: Documentation: whitespace fix for r27865 * error.c: ditto * file.c: ditto * io.c: ditto * load.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--enum.c168
-rw-r--r--error.c40
-rw-r--r--file.c222
-rw-r--r--hash.c86
-rw-r--r--io.c390
-rw-r--r--load.c12
6 files changed, 459 insertions, 459 deletions
diff --git a/enum.c b/enum.c
index 2162ff8b15..823eef6aa4 100644
--- a/enum.c
+++ b/enum.c
@@ -56,8 +56,8 @@ grep_iter_i(VALUE i, VALUE args, int argc, VALUE *argv)
/*
* call-seq:
- * enum.grep(pattern) ->array
- * enum.grep(pattern) {| obj | block } ->array
+ * enum.grep(pattern) -> array
+ * enum.grep(pattern) {| obj | block } -> array
*
* Returns an array of every element in <i>enum</i> for which
* <code>Pattern === element</code>. If the optional <em>block</em> is
@@ -121,9 +121,9 @@ count_all_i(VALUE i, VALUE memop, int argc, VALUE *argv)
/*
* call-seq:
- * enum.count ->int
- * enum.count(item) ->int
- * enum.count {| obj | block } ->int
+ * enum.count -> int
+ * enum.count(item) -> int
+ * enum.count {| obj | block } -> int
*
* Returns the number of items in <i>enum</i>, where #size is called
* if it responds to it, otherwise the items are counted through
@@ -179,10 +179,10 @@ find_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
/*
* call-seq:
- * enum.detect(ifnone = nil) {| obj | block } ->obj or nil
- * enum.find(ifnone = nil) {| obj | block } ->obj or nil
- * enum.detect(ifnone = nil) ->an_enumerator
- * enum.find(ifnone = nil) ->an_enumerator
+ * enum.detect(ifnone = nil) {| obj | block } -> obj or nil
+ * enum.find(ifnone = nil) {| obj | block } -> obj or nil
+ * enum.detect(ifnone = nil) -> an_enumerator
+ * enum.find(ifnone = nil) -> an_enumerator
*
* Passes each entry in <i>enum</i> to <em>block</em>. Returns the
* first for which <em>block</em> is not false. If no
@@ -244,9 +244,9 @@ find_index_iter_i(VALUE i, VALUE memop, int argc, VALUE *argv)
/*
* call-seq:
- * enum.find_index(value) ->int or nil
- * enum.find_index {| obj | block } ->int or nil
- * enum.find_index ->an_enumerator
+ * enum.find_index(value) -> int or nil
+ * enum.find_index {| obj | block } -> int or nil
+ * enum.find_index -> an_enumerator
*
* Compares each entry in <i>enum</i> with <em>value</em> or passes
* to <em>block</em>. Returns the index for the first for which the
@@ -298,10 +298,10 @@ find_all_i(VALUE i, VALUE ary, int argc, VALUE *argv)
/*
* call-seq:
- * enum.find_all {| obj | block } ->array
- * enum.select {| obj | block } ->array
- * enum.find_all ->an_enumerator
- * enum.select ->an_enumerator
+ * enum.find_all {| obj | block } -> array
+ * enum.select {| obj | block } -> array
+ * enum.find_all -> an_enumerator
+ * enum.select -> an_enumerator
*
* Returns an array containing all elements of <i>enum</i> for which
* <em>block</em> is not <code>false</code> (see also
@@ -340,8 +340,8 @@ reject_i(VALUE i, VALUE ary, int argc, VALUE *argv)
/*
* call-seq:
- * enum.reject {| obj | block } ->array
- * enum.reject ->an_enumerator
+ * enum.reject {| obj | block } -> array
+ * enum.reject -> an_enumerator
*
* Returns an array for all elements of <i>enum</i> for which
* <em>block</em> is false (see also <code>Enumerable#find_all</code>).
@@ -384,10 +384,10 @@ collect_all(VALUE i, VALUE ary, int argc, VALUE *argv)
/*
* call-seq:
- * enum.collect {| obj | block } ->array
- * enum.map {| obj | block } ->array
- * enum.collect ->an_enumerator
- * enum.map ->an_enumerator
+ * enum.collect {| obj | block } -> array
+ * enum.map {| obj | block } -> array
+ * enum.collect -> an_enumerator
+ * enum.map -> an_enumerator
*
* Returns a new array with the results of running <em>block</em> once
* for every element in <i>enum</i>.
@@ -431,10 +431,10 @@ flat_map_i(VALUE i, VALUE ary, int argc, VALUE *argv)
/*
* call-seq:
- * enum.flat_map {| obj | block } ->array
- * enum.collect_concat {| obj | block } ->array
- * enum.flat_map ->an_enumerator
- * enum.collect_concat ->an_enumerator
+ * enum.flat_map {| obj | block } -> array
+ * enum.collect_concat {| obj | block } -> array
+ * enum.flat_map -> an_enumerator
+ * enum.collect_concat -> an_enumerator
*
* Returns a new array with the concatenated results of running
* <em>block</em> once for every element in <i>enum</i>.
@@ -460,8 +460,8 @@ enum_flat_map(VALUE obj)
/*
* call-seq:
- * enum.to_a -> array
- * enum.entries -> array
+ * enum.to_a -> array
+ * enum.entries -> array
*
* Returns an array containing the items in <i>enum</i>.
*
@@ -514,14 +514,14 @@ inject_op_i(VALUE i, VALUE p, int argc, VALUE *argv)
/*
* call-seq:
* enum.inject(initial, sym)->obj
- * enum.inject(sym) ->obj
- * enum.inject(initial) {| memo, obj | block } ->obj
- * enum.inject {| memo, obj | block } ->obj
+ * enum.inject(sym) -> obj
+ * enum.inject(initial) {| memo, obj | block } -> obj
+ * enum.inject {| memo, obj | block } -> obj
*
* enum.reduce(initial, sym)->obj
- * enum.reduce(sym) ->obj
- * enum.reduce(initial) {| memo, obj | block } ->obj
- * enum.reduce {| memo, obj | block } ->obj
+ * enum.reduce(sym) -> obj
+ * enum.reduce(initial) {| memo, obj | block } -> obj
+ * enum.reduce {| memo, obj | block } -> obj
*
* Combines all elements of <i>enum</i> by applying a binary
* operation, specified by a block or a symbol that names a
@@ -603,8 +603,8 @@ partition_i(VALUE i, VALUE *ary, int argc, VALUE *argv)
/*
* call-seq:
- * enum.partition {| obj | block } ->[ true_array, false_array ]
- * enum.partition ->an_enumerator
+ * enum.partition {| obj | block } -> [ true_array, false_array ]
+ * enum.partition -> an_enumerator
*
* Returns two arrays, the first containing the elements of
* <i>enum</i> for which the block evaluates to true, the second
@@ -652,8 +652,8 @@ group_by_i(VALUE i, VALUE hash, int argc, VALUE *argv)
/*
* call-seq:
- * enum.group_by {| obj | block } ->a_hash
- * enum.group_by ->an_enumerator
+ * enum.group_by {| obj | block } -> a_hash
+ * enum.group_by -> an_enumerator
*
* Returns a hash, which keys are evaluated result from the
* block, and values are arrays of elements in <i>enum</i>
@@ -703,8 +703,8 @@ first_i(VALUE i, VALUE *params, int argc, VALUE *argv)
/*
* call-seq:
- * enum.first -> obj or nil
- * enum.first(n) -> an_array
+ * enum.first -> obj or nil
+ * enum.first(n) -> an_array
*
* Returns the first element, or the first +n+ elements, of the enumerable.
* If the enumerable is empty, the first form returns <code>nil</code>, and the
@@ -740,8 +740,8 @@ enum_first(int argc, VALUE *argv, VALUE obj)
/*
* call-seq:
- * enum.sort ->array
- * enum.sort {| a, b | block } ->array
+ * enum.sort -> array
+ * enum.sort {| a, b | block } -> array
*
* Returns an array containing the items in <i>enum</i> sorted,
* either according to their own <code><=></code> method, or by using
@@ -792,8 +792,8 @@ sort_by_cmp(const void *ap, const void *bp, void *data)
/*
* call-seq:
- * enum.sort_by {| obj | block } ->array
- * enum.sort_by ->an_enumerator
+ * enum.sort_by {| obj | block } -> array
+ * enum.sort_by -> an_enumerator
*
* Sorts <i>enum</i> using a set of keys generated by mapping the
* values in <i>enum</i> through the given block.
@@ -924,7 +924,7 @@ DEFINE_ENUMFUNCS(all)
/*
* call-seq:
- * enum.all? [{|obj| block } ] ->true or false
+ * enum.all? [{|obj| block } ] -> true or false
*
* Passes each element of the collection to the given block. The method
* returns <code>true</code> if the block never returns
@@ -959,7 +959,7 @@ DEFINE_ENUMFUNCS(any)
/*
* call-seq:
- * enum.any? [{|obj| block } ] ->true or false
+ * enum.any? [{|obj| block } ] -> true or false
*
* Passes each element of the collection to the given block. The method
* returns <code>true</code> if the block ever returns a value other
@@ -1000,7 +1000,7 @@ DEFINE_ENUMFUNCS(one)
/*
* call-seq:
- * enum.one? [{|obj| block }] ->true or false
+ * enum.one? [{|obj| block }] -> true or false
*
* Passes each element of the collection to the given block. The method
* returns <code>true</code> if the block returns <code>true</code>
@@ -1037,7 +1037,7 @@ DEFINE_ENUMFUNCS(none)
/*
* call-seq:
- * enum.none? [{|obj| block }] ->true or false
+ * enum.none? [{|obj| block }] -> true or false
*
* Passes each element of the collection to the given block. The method
* returns <code>true</code> if the block never returns <code>true</code>
@@ -1100,8 +1100,8 @@ min_ii(VALUE i, VALUE *memo, int argc, VALUE *argv)
/*
* call-seq:
- * enum.min ->obj
- * enum.min {| a,b | block } ->obj
+ * enum.min -> obj
+ * enum.min {| a,b | block } -> obj
*
* Returns the object in <i>enum</i> with the minimum value. The
* first form assumes all objects implement <code>Comparable</code>;
@@ -1167,8 +1167,8 @@ max_ii(VALUE i, VALUE *memo, int argc, VALUE *argv)
/*
* call-seq:
- * enum.max ->obj
- * enum.max {|a,b| block } ->obj
+ * enum.max -> obj
+ * enum.max {|a,b| block } -> obj
*
* Returns the object in _enum_ with the maximum value. The
* first form assumes all objects implement <code>Comparable</code>;
@@ -1306,8 +1306,8 @@ minmax_ii(VALUE i, VALUE _memo, int argc, VALUE *argv)
/*
* call-seq:
- * enum.minmax ->[min,max]
- * enum.minmax {|a,b| block } ->[min,max]
+ * enum.minmax -> [min,max]
+ * enum.minmax {|a,b| block } -> [min,max]
*
* Returns two elements array which contains the minimum and the
* maximum value in the enumerable. The first form assumes all
@@ -1365,8 +1365,8 @@ min_by_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
/*
* call-seq:
- * enum.min_by {|obj| block } ->obj
- * enum.min_by ->an_enumerator
+ * enum.min_by {|obj| block } -> obj
+ * enum.min_by -> an_enumerator
*
* Returns the object in <i>enum</i> that gives the minimum
* value from the given block.
@@ -1411,8 +1411,8 @@ max_by_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
/*
* call-seq:
- * enum.max_by {|obj| block } ->obj
- * enum.max_by ->an_enumerator
+ * enum.max_by {|obj| block } -> obj
+ * enum.max_by -> an_enumerator
*
* Returns the object in <i>enum</i> that gives the maximum
* value from the given block.
@@ -1508,8 +1508,8 @@ minmax_by_i(VALUE i, VALUE _memo, int argc, VALUE *argv)
/*
* call-seq:
- * enum.minmax_by {|obj| block } ->[min, max]
- * enum.minmax_by ->an_enumerator
+ * enum.minmax_by {|obj| block } -> [min, max]
+ * enum.minmax_by -> an_enumerator
*
* Returns two elements array array containing the objects in
* <i>enum</i> that gives the minimum and maximum values respectively
@@ -1552,8 +1552,8 @@ member_i(VALUE iter, VALUE *memo, int argc, VALUE *argv)
/*
* call-seq:
- * enum.include?(obj) ->true or false
- * enum.member?(obj) ->true or false
+ * enum.include?(obj) -> true or false
+ * enum.member?(obj) -> true or false
*
* Returns <code>true</code> if any member of <i>enum</i> equals
* <i>obj</i>. Equality is tested using <code>==</code>.
@@ -1584,8 +1584,8 @@ each_with_index_i(VALUE i, VALUE memo, int argc, VALUE *argv)
/*
* call-seq:
- * enum.each_with_index(*args) {|obj, i| block } -> enum
- * enum.each_with_index(*args) -> an_enumerator
+ * enum.each_with_index(*args) {|obj, i| block } -> enum
+ * enum.each_with_index(*args) -> an_enumerator
*
* Calls <em>block</em> with two arguments, the item and its index,
* for each item in <i>enum</i>. Given arguments are passed through
@@ -1616,8 +1616,8 @@ enum_each_with_index(int argc, VALUE *argv, VALUE obj)
/*
* call-seq:
- * enum.reverse_each(*args) {|item| block } -> enum
- * enum.reverse_each(*args) -> an_enumerator
+ * enum.reverse_each(*args) {|item| block } -> enum
+ * enum.reverse_each(*args) -> an_enumerator
*
* Builds a temporary array and traverses that array in reverse order.
*
@@ -1653,8 +1653,8 @@ each_val_i(VALUE i, VALUE p, int argc, VALUE *argv)
/*
* call-seq:
- * enum.each_entry {|obj| block} ->enum
- * enum.each_entry ->an_enumerator
+ * enum.each_entry {|obj| block} -> enum
+ * enum.each_entry -> an_enumerator
*
* Calls <i>block</i> once for each element in +self+, passing that
* element as a parameter, converting multiple values from yield to an
@@ -1704,8 +1704,8 @@ each_slice_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
/*
* call-seq:
- * enum.each_slice(n) {...} -> nil
- * enum.each_slice(n) -> an_enumerator
+ * enum.each_slice(n) {...} -> nil
+ * enum.each_slice(n) -> an_enumerator
*
* Iterates the given block for each slice of <n> elements. If no
* block is given, returns an enumerator.
@@ -1758,8 +1758,8 @@ each_cons_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
/*
* call-seq:
- * enum.each_cons(n) {...} -> nil
- * enum.each_cons(n) -> an_enumerator
+ * enum.each_cons(n) {...} -> nil
+ * enum.each_cons(n) -> an_enumerator
*
* Iterates the given block for each array of consecutive <n>
* elements. If no block is given, returns an enumerator.
@@ -1802,8 +1802,8 @@ each_with_object_i(VALUE i, VALUE memo, int argc, VALUE *argv)
/*
* call-seq:
- * enum.each_with_object(obj) {|(*args), memo_obj| ... } -> obj
- * enum.each_with_object(obj) -> an_enumerator
+ * enum.each_with_object(obj) {|(*args), memo_obj| ... } -> obj
+ * enum.each_with_object(obj) -> an_enumerator
*
* Iterates the given block for each element with an arbitrary
* object given, and returns the initially given object.
@@ -1904,8 +1904,8 @@ zip_i(VALUE val, NODE *memo, int argc, VALUE *argv)
/*
* call-seq:
- * enum.zip(arg, ...) ->an_enumerator
- * enum.zip(arg, ...) {|arr| block } ->nil
+ * enum.zip(arg, ...) -> an_enumerator
+ * enum.zip(arg, ...) {|arr| block } -> nil
*
* Takes one element from <i>enum</i> and merges corresponding
* elements from each <i>args</i>. This generates a sequence of
@@ -1970,7 +1970,7 @@ take_i(VALUE i, VALUE *arg, int argc, VALUE *argv)
/*
* call-seq:
- * enum.take(n) ->array
+ * enum.take(n) -> array
*
* Returns first n elements from <i>enum</i>.
*
@@ -2007,8 +2007,8 @@ take_while_i(VALUE i, VALUE *ary, int argc, VALUE *argv)
/*
* call-seq:
- * enum.take_while {|arr| block } ->array
- * enum.take_while ->an_enumerator
+ * enum.take_while {|arr| block } -> array
+ * enum.take_while -> an_enumerator
*
* Passes elements to the block until the block returns +nil+ or +false+,
* then stops iterating and returns an array of all prior elements.
@@ -2045,7 +2045,7 @@ drop_i(VALUE i, VALUE *arg, int argc, VALUE *argv)
/*
* call-seq:
- * enum.drop(n) ->array
+ * enum.drop(n) -> array
*
* Drops first n elements from <i>enum</i>, and returns rest elements
* in an array.
@@ -2088,8 +2088,8 @@ drop_while_i(VALUE i, VALUE *args, int argc, VALUE *argv)
/*
* call-seq:
- * enum.drop_while {|arr| block } ->array
- * enum.drop_while ->an_enumerator
+ * enum.drop_while {|arr| block } -> array
+ * enum.drop_while -> an_enumerator
*
* Drops elements up to, but not including, the first element for
* which the block returns +nil+ or +false+ and returns an array
@@ -2126,8 +2126,8 @@ cycle_i(VALUE i, VALUE ary, int argc, VALUE *argv)
/*
* call-seq:
- * enum.cycle(n=nil) {|obj| block } -> nil
- * enum.cycle(n=nil) -> an_enumerator
+ * enum.cycle(n=nil) {|obj| block } -> nil
+ * enum.cycle(n=nil) -> an_enumerator
*
* Calls <i>block</i> for each element of <i>enum</i> repeatedly _n_
* times or forever if none or +nil+ is given. If a non-positive
diff --git a/error.c b/error.c
index 386c9e44f8..05e6b08f8d 100644
--- a/error.c
+++ b/error.c
@@ -194,7 +194,7 @@ rb_warning(const char *fmt, ...)
/*
* call-seq:
- * warn(msg) ->nil
+ * warn(msg) -> nil
*
* Display the given message (followed by a newline) on STDERR unless
* warnings are disabled (for example with the <code>-W0</code> flag).
@@ -429,7 +429,7 @@ rb_exc_new3(VALUE etype, VALUE str)
/*
* call-seq:
- * Exception.new(msg = nil) -> exception
+ * Exception.new(msg = nil) -> exception
*
* Construct a new Exception object, optionally passing in
* a message.
@@ -451,7 +451,7 @@ exc_initialize(int argc, VALUE *argv, VALUE exc)
* Document-method: exception
*
* call-seq:
- * exc.exception(string) -> an_exception or exc
+ * exc.exception(string) -> an_exception or exc
*
* With no argument, or if the argument is the same as the receiver,
* return the receiver. Otherwise, create a new
@@ -475,7 +475,7 @@ exc_exception(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * exception.to_s -> string
+ * exception.to_s -> string
*
* Returns exception's message (or the name of the exception if
* no message is set).
@@ -493,7 +493,7 @@ exc_to_s(VALUE exc)
/*
* call-seq:
- * exception.message -> string
+ * exception.message -> string
*
* Returns the result of invoking <code>exception.to_s</code>.
* Normally this returns the exception's message or name. By
@@ -509,7 +509,7 @@ exc_message(VALUE exc)
/*
* call-seq:
- * exception.inspect ->string
+ * exception.inspect -> string
*
* Return this exception's class name an message
*/
@@ -537,7 +537,7 @@ exc_inspect(VALUE exc)
/*
* call-seq:
- * exception.backtrace ->array
+ * exception.backtrace -> array
*
* Returns any backtrace associated with the exception. The backtrace
* is an array of strings, each containing either ``filename:lineNo: in
@@ -597,7 +597,7 @@ rb_check_backtrace(VALUE bt)
/*
* call-seq:
- * exc.set_backtrace(array) -> array
+ * exc.set_backtrace(array) -> array
*
* Sets the backtrace information associated with <i>exc</i>. The
* argument must be an array of <code>String</code> objects in the
@@ -613,7 +613,7 @@ exc_set_backtrace(VALUE exc, VALUE bt)
/*
* call-seq:
- * exc == obj ->true or false
+ * exc == obj -> true or false
*
* Equality---If <i>obj</i> is not an <code>Exception</code>, returns
* <code>false</code>. Otherwise, returns <code>true</code> if <i>exc</i> and
@@ -653,7 +653,7 @@ exc_equal(VALUE exc, VALUE obj)
/*
* call-seq:
- * SystemExit.new(status=0) ->system_exit
+ * SystemExit.new(status=0) -> system_exit
*
* Create a new +SystemExit+ exception with the given status.
*/
@@ -674,7 +674,7 @@ exit_initialize(int argc, VALUE *argv, VALUE exc)
/*
* call-seq:
- * system_exit.status ->fixnum
+ * system_exit.status -> fixnum
*
* Return the status value associated with this system exit.
*/
@@ -688,7 +688,7 @@ exit_status(VALUE exc)
/*
* call-seq:
- * system_exit.success? ->true or false
+ * system_exit.success? -> true or false
*
* Returns +true+ if exiting successful, +false+ if not.
*/
@@ -719,7 +719,7 @@ rb_name_error(ID id, const char *fmt, ...)
/*
* call-seq:
- * NameError.new(msg [, name]) ->name_error
+ * NameError.new(msg [, name]) -> name_error
*
* Construct a new NameError exception. If given the <i>name</i>
* parameter may subsequently be examined using the <code>NameError.name</code>
@@ -739,7 +739,7 @@ name_err_initialize(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * name_error.name -> string or nil
+ * name_error.name -> string or nil
*
* Return the name associated with this NameError exception.
*/
@@ -752,7 +752,7 @@ name_err_name(VALUE self)
/*
* call-seq:
- * name_error.to_s ->string
+ * name_error.to_s -> string
*
* Produce a nicely-formatted string representing the +NameError+.
*/
@@ -774,7 +774,7 @@ name_err_to_s(VALUE exc)
/*
* call-seq:
- * NoMethodError.new(msg, name [, args]) ->no_method_error
+ * NoMethodError.new(msg, name [, args]) -> no_method_error
*
* Construct a NoMethodError exception for a method of the given name
* called with the given arguments. The name may be accessed using
@@ -903,7 +903,7 @@ name_err_mesg_load(VALUE klass, VALUE str)
/*
* call-seq:
- * no_method_error.args ->obj
+ * no_method_error.args -> obj
*
* Return the arguments passed in as the third parameter to
* the constructor.
@@ -988,7 +988,7 @@ get_syserr(int n)
/*
* call-seq:
- * SystemCallError.new(msg, errno) ->system_call_error_subclass
+ * SystemCallError.new(msg, errno) -> system_call_error_subclass
*
* If _errno_ corresponds to a known system error code, constructs
* the appropriate <code>Errno</code> class for that error, otherwise
@@ -1043,7 +1043,7 @@ syserr_initialize(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * system_call_error.errno ->fixnum
+ * system_call_error.errno -> fixnum
*
* Return this SystemCallError's error number.
*/
@@ -1056,7 +1056,7 @@ syserr_errno(VALUE self)
/*
* call-seq:
- * system_call_error === other ->true or false
+ * system_call_error === other -> true or false
*
* Return +true+ if the receiver is a generic +SystemCallError+, or
* if the error numbers +self+ and _other_ are the same.
diff --git a/file.c b/file.c
index 1b141f7906..d24dbb3936 100644
--- a/file.c
+++ b/file.c
@@ -215,7 +215,7 @@ apply2files(void (*func)(const char *, void *), VALUE vargs, void *arg)
/*
* call-seq:
- * file.path -> filename
+ * file.path -> filename
*
* Returns the pathname used to create <i>file</i> as a string. Does
* not normalize the name.
@@ -278,7 +278,7 @@ static struct timespec stat_mtimespec(struct stat *st);
/*
* call-seq:
- * stat <=> other_stat ->-1, 0, 1, nil
+ * stat <=> other_stat -> -1, 0, 1, nil
*
* Compares <code>File::Stat</code> objects by comparing their
* respective modification times.
@@ -310,7 +310,7 @@ rb_stat_cmp(VALUE self, VALUE other)
/*
* call-seq:
- * stat.dev ->fixnum
+ * stat.dev -> fixnum
*
* Returns an integer representing the device on which <i>stat</i>
* resides.
@@ -326,7 +326,7 @@ rb_stat_dev(VALUE self)
/*
* call-seq:
- * stat.dev_major ->fixnum
+ * stat.dev_major -> fixnum
*
* Returns the major part of <code>File_Stat#dev</code> or
* <code>nil</code>.
@@ -348,7 +348,7 @@ rb_stat_dev_major(VALUE self)
/*
* call-seq:
- * stat.dev_minor ->fixnum
+ * stat.dev_minor -> fixnum
*
* Returns the minor part of <code>File_Stat#dev</code> or
* <code>nil</code>.
@@ -370,7 +370,7 @@ rb_stat_dev_minor(VALUE self)
/*
* call-seq:
- * stat.ino ->fixnum
+ * stat.ino -> fixnum
*
* Returns the inode number for <i>stat</i>.
*
@@ -390,7 +390,7 @@ rb_stat_ino(VALUE self)
/*
* call-seq:
- * stat.mode ->fixnum
+ * stat.mode -> fixnum
*
* Returns an integer representing the permission bits of
* <i>stat</i>. The meaning of the bits is platform dependent; on
@@ -409,7 +409,7 @@ rb_stat_mode(VALUE self)
/*
* call-seq:
- * stat.nlink ->fixnum
+ * stat.nlink -> fixnum
*
* Returns the number of hard links to <i>stat</i>.
*
@@ -427,7 +427,7 @@ rb_stat_nlink(VALUE self)
/*
* call-seq:
- * stat.uid ->fixnum
+ * stat.uid -> fixnum
*
* Returns the numeric user id of the owner of <i>stat</i>.
*
@@ -443,7 +443,7 @@ rb_stat_uid(VALUE self)
/*
* call-seq:
- * stat.gid ->fixnum
+ * stat.gid -> fixnum
*
* Returns the numeric group id of the owner of <i>stat</i>.
*
@@ -459,7 +459,7 @@ rb_stat_gid(VALUE self)
/*
* call-seq:
- * stat.rdev -> fixnum or nil
+ * stat.rdev -> fixnum or nil
*
* Returns an integer representing the device type on which
* <i>stat</i> resides. Returns <code>nil</code> if the operating
@@ -481,7 +481,7 @@ rb_stat_rdev(VALUE self)
/*
* call-seq:
- * stat.rdev_major ->fixnum
+ * stat.rdev_major -> fixnum
*
* Returns the major part of <code>File_Stat#rdev</code> or
* <code>nil</code>.
@@ -503,7 +503,7 @@ rb_stat_rdev_major(VALUE self)
/*
* call-seq:
- * stat.rdev_minor ->fixnum
+ * stat.rdev_minor -> fixnum
*
* Returns the minor part of <code>File_Stat#rdev</code> or
* <code>nil</code>.
@@ -525,7 +525,7 @@ rb_stat_rdev_minor(VALUE self)
/*
* call-seq:
- * stat.size ->fixnum
+ * stat.size -> fixnum
*
* Returns the size of <i>stat</i> in bytes.
*
@@ -540,7 +540,7 @@ rb_stat_size(VALUE self)
/*
* call-seq:
- * stat.blksize ->integer or nil
+ * stat.blksize -> integer or nil
*
* Returns the native file system's block size. Will return <code>nil</code>
* on platforms that don't support this information.
@@ -561,7 +561,7 @@ rb_stat_blksize(VALUE self)
/*
* call-seq:
- * stat.blocks ->integer or nil
+ * stat.blocks -> integer or nil
*
* Returns the number of native file system blocks allocated for this
* file, or <code>nil</code> if the operating system doesn't
@@ -658,7 +658,7 @@ stat_ctime(struct stat *st)
/*
* call-seq:
- * stat.atime ->time
+ * stat.atime -> time
*
* Returns the last access time for this file as an object of class
* <code>Time</code>.
@@ -675,7 +675,7 @@ rb_stat_atime(VALUE self)
/*
* call-seq:
- * stat.mtime -> aTime
+ * stat.mtime -> aTime
*
* Returns the modification time of <i>stat</i>.
*
@@ -691,7 +691,7 @@ rb_stat_mtime(VALUE self)
/*
* call-seq:
- * stat.ctime -> aTime
+ * stat.ctime -> aTime
*
* Returns the change time for <i>stat</i> (that is, the time
* directory information about the file was changed, not the file
@@ -709,7 +709,7 @@ rb_stat_ctime(VALUE self)
/*
* call-seq:
- * stat.inspect -> string
+ * stat.inspect -> string
*
* Produce a nicely formatted description of <i>stat</i>.
*
@@ -840,7 +840,7 @@ w32_io_info(VALUE *file, BY_HANDLE_FILE_INFORMATION *st)
/*
* call-seq:
- * File.stat(file_name) -> stat
+ * File.stat(file_name) -> stat
*
* Returns a <code>File::Stat</code> object for the named file (see
* <code>File::Stat</code>).
@@ -864,7 +864,7 @@ rb_file_s_stat(VALUE klass, VALUE fname)
/*
* call-seq:
- * ios.stat ->stat
+ * ios.stat -> stat
*
* Returns status information for <em>ios</em> as an object of type
* <code>File::Stat</code>.
@@ -893,7 +893,7 @@ rb_io_stat(VALUE obj)
/*
* call-seq:
- * File.lstat(file_name) ->stat
+ * File.lstat(file_name) -> stat
*
* Same as <code>File::stat</code>, but does not follow the last symbolic
* link. Instead, reports on the link itself.
@@ -925,7 +925,7 @@ rb_file_s_lstat(VALUE klass, VALUE fname)
/*
* call-seq:
- * file.lstat -> stat
+ * file.lstat -> stat
*
* Same as <code>IO#stat</code>, but does not follow the last symbolic
* link. Instead, reports on the link itself.
@@ -1053,8 +1053,8 @@ access_internal(const char *path, int mode)
*/
/*
- * File.directory?(file_name) -> true or false
- * File.directory?(file_name) -> true or false
+ * File.directory?(file_name) -> true or false
+ * File.directory?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a directory,
* <code>false</code> otherwise.
@@ -1066,8 +1066,8 @@ access_internal(const char *path, int mode)
* Document-method: exist?
*
* call-seq:
- * Dir.exist?(file_name) -> true or false
- * Dir.exists?(file_name) -> true or false
+ * Dir.exist?(file_name) -> true or false
+ * Dir.exists?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a directory,
* <code>false</code> otherwise.
@@ -1078,7 +1078,7 @@ access_internal(const char *path, int mode)
* Document-method: directory?
*
* call-seq:
- * File.directory?(file_name) -> true or false
+ * File.directory?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a directory,
* <code>false</code> otherwise.
@@ -1102,7 +1102,7 @@ rb_file_directory_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.pipe?(file_name) -> true or false
+ * File.pipe?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a pipe.
*/
@@ -1126,7 +1126,7 @@ rb_file_pipe_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.symlink?(file_name) -> true or false
+ * File.symlink?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a symbolic link.
*/
@@ -1163,7 +1163,7 @@ rb_file_symlink_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.socket?(file_name) -> true or false
+ * File.socket?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a socket.
*/
@@ -1197,7 +1197,7 @@ rb_file_socket_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.blockdev?(file_name) -> true or false
+ * File.blockdev?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a block device.
*/
@@ -1225,7 +1225,7 @@ rb_file_blockdev_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.chardev?(file_name) -> true or false
+ * File.chardev?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a character device.
*/
@@ -1246,8 +1246,8 @@ rb_file_chardev_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.exist?(file_name) -> true or false
- * File.exists?(file_name) -> true or false
+ * File.exist?(file_name) -> true or false
+ * File.exists?(file_name) -> true or false
*
* Return <code>true</code> if the named file exists.
*/
@@ -1263,7 +1263,7 @@ rb_file_exist_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.readable?(file_name) ->true or false
+ * File.readable?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is readable by the effective
* user id of this process.
@@ -1281,7 +1281,7 @@ rb_file_readable_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.readable_real?(file_name) ->true or false
+ * File.readable_real?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is readable by the real
* user id of this process.
@@ -1307,7 +1307,7 @@ rb_file_readable_real_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.world_readable?(file_name) ->fixnum or nil
+ * File.world_readable?(file_name) -> fixnum or nil
*
* If <i>file_name</i> is readable by others, returns an integer
* representing the file permission bits of <i>file_name</i>. Returns
@@ -1335,7 +1335,7 @@ rb_file_world_readable_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.writable?(file_name) ->true or false
+ * File.writable?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is writable by the effective
* user id of this process.
@@ -1353,7 +1353,7 @@ rb_file_writable_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.writable_real?(file_name) ->true or false
+ * File.writable_real?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is writable by the real
* user id of this process.
@@ -1371,7 +1371,7 @@ rb_file_writable_real_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.world_writable?(file_name) ->fixnum or nil
+ * File.world_writable?(file_name) -> fixnum or nil
*
* If <i>file_name</i> is writable by others, returns an integer
* representing the file permission bits of <i>file_name</i>. Returns
@@ -1399,7 +1399,7 @@ rb_file_world_writable_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.executable?(file_name) ->true or false
+ * File.executable?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is executable by the effective
* user id of this process.
@@ -1417,7 +1417,7 @@ rb_file_executable_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.executable_real?(file_name) ->true or false
+ * File.executable_real?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is executable by the real
* user id of this process.
@@ -1439,7 +1439,7 @@ rb_file_executable_real_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.file?(file_name) ->true or false
+ * File.file?(file_name) -> true or false
*
* Returns <code>true</code> if the named file exists and is a
* regular file.
@@ -1457,7 +1457,7 @@ rb_file_file_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.zero?(file_name) ->true or false
+ * File.zero?(file_name) -> true or false
*
* Returns <code>true</code> if the named file exists and has
* a zero size.
@@ -1475,7 +1475,7 @@ rb_file_zero_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.size?(file_name) ->Integer or nil
+ * File.size?(file_name) -> Integer or nil
*
* Returns +nil+ if +file_name+ doesn't exist or has zero size, the size of the
* file otherwise.
@@ -1493,7 +1493,7 @@ rb_file_size_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.owned?(file_name) ->true or false
+ * File.owned?(file_name) -> true or false
*
* Returns <code>true</code> if the named file exists and the
* effective used id of the calling process is the owner of
@@ -1522,7 +1522,7 @@ rb_file_rowned_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.grpowned?(file_name) ->true or false
+ * File.grpowned?(file_name) -> true or false
*
* Returns <code>true</code> if the named file exists and the
* effective group id of the calling process is the owner of
@@ -1558,7 +1558,7 @@ check3rdbyte(VALUE fname, int mode)
/*
* call-seq:
- * File.setuid?(file_name) -> true or false
+ * File.setuid?(file_name) -> true or false
*
* Returns <code>true</code> if the named file has the setuid bit set.
*/
@@ -1575,7 +1575,7 @@ rb_file_suid_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.setgid?(file_name) -> true or false
+ * File.setgid?(file_name) -> true or false
*
* Returns <code>true</code> if the named file has the setgid bit set.
*/
@@ -1592,7 +1592,7 @@ rb_file_sgid_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.sticky?(file_name) -> true or false
+ * File.sticky?(file_name) -> true or false
*
* Returns <code>true</code> if the named file has the sticky bit set.
*/
@@ -1609,7 +1609,7 @@ rb_file_sticky_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.identical?(file_1, file_2) -> true or false
+ * File.identical?(file_1, file_2) -> true or false
*
* Returns <code>true</code> if the named files are identical.
*
@@ -1675,7 +1675,7 @@ rb_file_identical_p(VALUE obj, VALUE fname1, VALUE fname2)
/*
* call-seq:
- * File.size(file_name) ->integer
+ * File.size(file_name) -> integer
*
* Returns the size of <code>file_name</code>.
*/
@@ -1735,7 +1735,7 @@ rb_file_ftype(const struct stat *st)
/*
* call-seq:
- * File.ftype(file_name) ->string
+ * File.ftype(file_name) -> string
*
* Identifies the type of the named file; the return string is one of
* ``<code>file</code>'', ``<code>directory</code>'',
@@ -1765,7 +1765,7 @@ rb_file_s_ftype(VALUE klass, VALUE fname)
/*
* call-seq:
- * File.atime(file_name) -> time
+ * File.atime(file_name) -> time
*
* Returns the last access time for the named file as a Time object).
*
@@ -1787,7 +1787,7 @@ rb_file_s_atime(VALUE klass, VALUE fname)
/*
* call-seq:
- * file.atime ->time
+ * file.atime -> time
*
* Returns the last access time (a <code>Time</code> object)
* for <i>file</i>, or epoch if <i>file</i> has not been accessed.
@@ -1811,7 +1811,7 @@ rb_file_atime(VALUE obj)
/*
* call-seq:
- * File.mtime(file_name) -> time
+ * File.mtime(file_name) -> time
*
* Returns the modification time for the named file as a Time object.
*
@@ -1833,7 +1833,7 @@ rb_file_s_mtime(VALUE klass, VALUE fname)
/*
* call-seq:
- * file.mtime -> time
+ * file.mtime -> time
*
* Returns the modification time for <i>file</i>.
*
@@ -1856,7 +1856,7 @@ rb_file_mtime(VALUE obj)
/*
* call-seq:
- * File.ctime(file_name) ->time
+ * File.ctime(file_name) -> time
*
* Returns the change time for the named file (the time at which
* directory information about the file was changed, not the file
@@ -1880,7 +1880,7 @@ rb_file_s_ctime(VALUE klass, VALUE fname)
/*
* call-seq:
- * file.ctime -> time
+ * file.ctime -> time
*
* Returns the change time for <i>file</i> (that is, the time directory
* information about the file was changed, not the file itself).
@@ -1904,7 +1904,7 @@ rb_file_ctime(VALUE obj)
/*
* call-seq:
- * file.size ->integer
+ * file.size -> integer
*
* Returns the size of <i>file</i> in bytes.
*
@@ -1937,7 +1937,7 @@ chmod_internal(const char *path, void *mode)
/*
* call-seq:
- * File.chmod(mode_int, file_name, ... ) -> integer
+ * File.chmod(mode_int, file_name, ... ) -> integer
*
* Changes permission bits on the named file(s) to the bit pattern
* represented by <i>mode_int</i>. Actual effects are operating system
@@ -1966,7 +1966,7 @@ rb_file_s_chmod(int argc, VALUE *argv)
/*
* call-seq:
- * file.chmod(mode_int) ->0
+ * file.chmod(mode_int) -> 0
*
* Changes permission bits on <i>file</i> to the bit pattern
* represented by <i>mode_int</i>. Actual effects are platform
@@ -2013,7 +2013,7 @@ lchmod_internal(const char *path, void *mode)
/*
* call-seq:
- * File.lchmod(mode_int, file_name, ...) ->integer
+ * File.lchmod(mode_int, file_name, ...) -> integer
*
* Equivalent to <code>File::chmod</code>, but does not follow symbolic
* links (so it will change the permissions associated with the link,
@@ -2054,7 +2054,7 @@ chown_internal(const char *path, void *arg)
/*
* call-seq:
- * File.chown(owner_int, group_int, file_name,... ) -> integer
+ * File.chown(owner_int, group_int, file_name,... ) -> integer
*
* Changes the owner and group of the named file(s) to the given
* numeric owner and group id's. Only a process with superuser
@@ -2095,7 +2095,7 @@ rb_file_s_chown(int argc, VALUE *argv)
/*
* call-seq:
- * file.chown(owner_int, group_int ) ->0
+ * file.chown(owner_int, group_int ) -> 0
*
* Changes the owner and group of <i>file</i> to the given numeric
* owner and group id's. Only a process with superuser privileges may
@@ -2292,7 +2292,7 @@ utime_internal(const char *path, void *arg)
/*
* call-seq:
- * File.utime(atime, mtime, file_name,...) -> integer
+ * File.utime(atime, mtime, file_name,...) -> integer
*
* Sets the access and modification times of each
* named file to the first two arguments. Returns
@@ -2357,7 +2357,7 @@ sys_fail2(VALUE s1, VALUE s2)
#ifdef HAVE_LINK
/*
* call-seq:
- * File.link(old_name, new_name) ->0
+ * File.link(old_name, new_name) -> 0
*
* Creates a new name for an existing file using a hard link. Will not
* overwrite <i>new_name</i> if it already exists (raising a subclass
@@ -2388,7 +2388,7 @@ rb_file_s_link(VALUE klass, VALUE from, VALUE to)
#ifdef HAVE_SYMLINK
/*
* call-seq:
- * File.symlink(old_name, new_name) ->0
+ * File.symlink(old_name, new_name) -> 0
*
* Creates a symbolic link called <i>new_name</i> for the existing file
* <i>old_name</i>. Raises a <code>NotImplemented</code> exception on
@@ -2419,7 +2419,7 @@ rb_file_s_symlink(VALUE klass, VALUE from, VALUE to)
#ifdef HAVE_READLINK
/*
* call-seq:
- * File.readlink(link_name) -> file_name
+ * File.readlink(link_name) -> file_name
*
* Returns the name of the file referenced by the given link.
* Not available on all platforms.
@@ -2470,8 +2470,8 @@ unlink_internal(const char *path, void *arg)
/*
* call-seq:
- * File.delete(file_name, ...) ->integer
- * File.unlink(file_name, ...) ->integer
+ * File.delete(file_name, ...) -> integer
+ * File.unlink(file_name, ...) -> integer
*
* Deletes the named files, returning the number of names
* passed as arguments. Raises an exception on any error.
@@ -2490,7 +2490,7 @@ rb_file_s_unlink(VALUE klass, VALUE args)
/*
* call-seq:
- * File.rename(old_name, new_name) ->0
+ * File.rename(old_name, new_name) -> 0
*
* Renames the given file to the new name. Raises a
* <code>SystemCallError</code> if the file cannot be renamed.
@@ -2535,8 +2535,8 @@ rb_file_s_rename(VALUE klass, VALUE from, VALUE to)
/*
* call-seq:
- * File.umask() ->integer
- * File.umask(integer) ->integer
+ * File.umask() -> integer
+ * File.umask(integer) -> integer
*
* Returns the current umask value for this process. If the optional
* argument is given, set the umask to that value and return the
@@ -3131,7 +3131,7 @@ rb_file_expand_path(VALUE fname, VALUE dname)
/*
* call-seq:
- * File.expand_path(file_name [, dir_string] ) -> abs_file_name
+ * File.expand_path(file_name [, dir_string] ) -> abs_file_name
*
* Converts a pathname to an absolute pathname. Relative paths are
* referenced from the current working directory of the process unless
@@ -3168,7 +3168,7 @@ rb_file_absolute_path(VALUE fname, VALUE dname)
/*
* call-seq:
- * File.absolute_path(file_name [, dir_string] ) -> abs_file_name
+ * File.absolute_path(file_name [, dir_string] ) -> abs_file_name
*
* Converts a pathname to an absolute pathname. Relative paths are
* referenced from the current working directory of the process unless
@@ -3350,7 +3350,7 @@ rb_realpath_internal(VALUE basedir, VALUE path, int strict)
/*
* call-seq:
- * File.realpath(pathname [, dir_string]) -> real_pathname
+ * File.realpath(pathname [, dir_string]) -> real_pathname
*
* Returns the real (absolute) pathname of _pathname_ in the actual
* filesystem not containing symlinks or useless dots.
@@ -3371,7 +3371,7 @@ rb_file_s_realpath(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * File.realdirpath(pathname [, dir_string]) -> real_pathname
+ * File.realdirpath(pathname [, dir_string]) -> real_pathname
*
* Returns the real (absolute) pathname of _pathname_ in the actual filesystem.
* The real pathname doesn't contain symlinks or useless dots.
@@ -3423,7 +3423,7 @@ rmext(const char *p, long l1, const char *e)
/*
* call-seq:
- * File.basename(file_name [, suffix] ) -> base_name
+ * File.basename(file_name [, suffix] ) -> base_name
*
* Returns the last component of the filename given in <i>file_name</i>,
* which must be formed using forward slashes (``<code>/</code>'')
@@ -3508,7 +3508,7 @@ rb_file_s_basename(int argc, VALUE *argv)
/*
* call-seq:
- * File.dirname(file_name ) -> dir_name
+ * File.dirname(file_name ) -> dir_name
*
* Returns all components of the filename given in <i>file_name</i>
* except the last one. The filename must be formed using forward
@@ -3566,7 +3566,7 @@ rb_file_dirname(VALUE fname)
/*
* call-seq:
- * File.extname(path) -> string
+ * File.extname(path) -> string
*
* Returns the extension (the portion of file name in <i>path</i>
* after the period).
@@ -3631,7 +3631,7 @@ rb_file_s_extname(VALUE klass, VALUE fname)
/*
* call-seq:
- * File.path(path) -> string
+ * File.path(path) -> string
*
* Returns the string representation of the path
*
@@ -3648,7 +3648,7 @@ rb_file_s_path(VALUE klass, VALUE fname)
/*
* call-seq:
- * File.split(file_name) ->array
+ * File.split(file_name) -> array
*
* Splits the given string into a directory and a file component and
* returns them in a two-element array. See also
@@ -3738,7 +3738,7 @@ rb_file_join(VALUE ary, VALUE sep)
/*
* call-seq:
- * File.join(string, ...) -> path
+ * File.join(string, ...) -> path
*
* Returns a new string formed by joining the strings using
* <code>File::SEPARATOR</code>.
@@ -3756,7 +3756,7 @@ rb_file_s_join(VALUE klass, VALUE args)
#if defined(HAVE_TRUNCATE) || defined(HAVE_CHSIZE)
/*
* call-seq:
- * File.truncate(file_name, integer) ->0
+ * File.truncate(file_name, integer) -> 0
*
* Truncates the file <i>file_name</i> to be at most <i>integer</i>
* bytes long. Not available on all platforms.
@@ -3804,7 +3804,7 @@ rb_file_s_truncate(VALUE klass, VALUE path, VALUE len)
#if defined(HAVE_FTRUNCATE) || defined(HAVE_CHSIZE)
/*
* call-seq:
- * file.truncate(integer) ->0
+ * file.truncate(integer) -> 0
*
* Truncates <i>file</i> to at most <i>integer</i> bytes. The file
* must be opened for writing. Not available on all platforms.
@@ -4203,7 +4203,7 @@ rb_stat_s_alloc(VALUE klass)
/*
* call-seq:
*
- * File::Stat.new(file_name) ->stat
+ * File::Stat.new(file_name) -> stat
*
* Create a File::Stat object for the given file name (raising an
* exception if the file doesn't exist).
@@ -4258,7 +4258,7 @@ rb_stat_init_copy(VALUE copy, VALUE orig)
/*
* call-seq:
- * stat.ftype ->string
+ * stat.ftype -> string
*
* Identifies the type of <i>stat</i>. The return string is one of:
* ``<code>file</code>'', ``<code>directory</code>'',
@@ -4278,7 +4278,7 @@ rb_stat_ftype(VALUE obj)
/*
* call-seq:
- * stat.directory? ->true or false
+ * stat.directory? -> true or false
*
* Returns <code>true</code> if <i>stat</i> is a directory,
* <code>false</code> otherwise.
@@ -4296,7 +4296,7 @@ rb_stat_d(VALUE obj)
/*
* call-seq:
- * stat.pipe? ->true or false
+ * stat.pipe? -> true or false
*
* Returns <code>true</code> if the operating system supports pipes and
* <i>stat</i> is a pipe; <code>false</code> otherwise.
@@ -4314,7 +4314,7 @@ rb_stat_p(VALUE obj)
/*
* call-seq:
- * stat.symlink? ->true or false
+ * stat.symlink? -> true or false
*
* Returns <code>true</code> if <i>stat</i> is a symbolic link,
* <code>false</code> if it isn't or if the operating system doesn't
@@ -4340,7 +4340,7 @@ rb_stat_l(VALUE obj)
/*
* call-seq:
- * stat.socket? ->true or false
+ * stat.socket? -> true or false
*
* Returns <code>true</code> if <i>stat</i> is a socket,
* <code>false</code> if it isn't or if the operating system doesn't
@@ -4362,7 +4362,7 @@ rb_stat_S(VALUE obj)
/*
* call-seq:
- * stat.blockdev? ->true or false
+ * stat.blockdev? -> true or false
*
* Returns <code>true</code> if the file is a block device,
* <code>false</code> if it isn't or if the operating system doesn't
@@ -4385,7 +4385,7 @@ rb_stat_b(VALUE obj)
/*
* call-seq:
- * stat.chardev? ->true or false
+ * stat.chardev? -> true or false
*
* Returns <code>true</code> if the file is a character device,
* <code>false</code> if it isn't or if the operating system doesn't
@@ -4405,7 +4405,7 @@ rb_stat_c(VALUE obj)
/*
* call-seq:
- * stat.owned? ->true or false
+ * stat.owned? -> true or false
*
* Returns <code>true</code> if the effective user id of the process is
* the same as the owner of <i>stat</i>.
@@ -4431,7 +4431,7 @@ rb_stat_rowned(VALUE obj)
/*
* call-seq:
- * stat.grpowned? ->true or false
+ * stat.grpowned? -> true or false
*
* Returns true if the effective group id of the process is the same as
* the group id of <i>stat</i>. On Windows NT, returns <code>false</code>.
@@ -4452,7 +4452,7 @@ rb_stat_grpowned(VALUE obj)
/*
* call-seq:
- * stat.readable? ->true or false
+ * stat.readable? -> true or false
*
* Returns <code>true</code> if <i>stat</i> is readable by the
* effective user id of this process.
@@ -4485,7 +4485,7 @@ rb_stat_r(VALUE obj)
/*
* call-seq:
- * stat.readable_real? -> true or false
+ * stat.readable_real? -> true or false
*
* Returns <code>true</code> if <i>stat</i> is readable by the real
* user id of this process.
@@ -4544,7 +4544,7 @@ rb_stat_wr(VALUE obj)
/*
* call-seq:
- * stat.writable? -> true or false
+ * stat.writable? -> true or false
*
* Returns <code>true</code> if <i>stat</i> is writable by the
* effective user id of this process.
@@ -4577,7 +4577,7 @@ rb_stat_w(VALUE obj)
/*
* call-seq:
- * stat.writable_real? -> true or false
+ * stat.writable_real? -> true or false
*
* Returns <code>true</code> if <i>stat</i> is writable by the real
* user id of this process.
@@ -4610,7 +4610,7 @@ rb_stat_W(VALUE obj)
/*
* call-seq:
- * stat.world_writable? -> fixnum or nil
+ * stat.world_writable? -> fixnum or nil
*
* If <i>stat</i> is writable by others, returns an integer
* representing the file permission bits of <i>stat</i>. Returns
@@ -4636,7 +4636,7 @@ rb_stat_ww(VALUE obj)
/*
* call-seq:
- * stat.executable? ->true or false
+ * stat.executable? -> true or false
*
* Returns <code>true</code> if <i>stat</i> is executable or if the
* operating system doesn't distinguish executable files from
@@ -4673,7 +4673,7 @@ rb_stat_x(VALUE obj)
/*
* call-seq:
- * stat.executable_real? ->true or false
+ * stat.executable_real? -> true or false
*
* Same as <code>executable?</code>, but tests using the real owner of
* the process.
@@ -4705,7 +4705,7 @@ rb_stat_X(VALUE obj)
/*
* call-seq:
- * stat.file? ->true or false
+ * stat.file? -> true or false
*
* Returns <code>true</code> if <i>stat</i> is a regular file (not
* a device file, pipe, socket, etc.).
@@ -4723,7 +4723,7 @@ rb_stat_f(VALUE obj)
/*
* call-seq:
- * stat.zero? ->true or false
+ * stat.zero? -> true or false
*
* Returns <code>true</code> if <i>stat</i> is a zero-length file;
* <code>false</code> otherwise.
@@ -4741,7 +4741,7 @@ rb_stat_z(VALUE obj)
/*
* call-seq:
- * state.size ->integer
+ * state.size -> integer
*
* Returns the size of <i>stat</i> in bytes.
*
@@ -4760,7 +4760,7 @@ rb_stat_s(VALUE obj)
/*
* call-seq:
- * stat.setuid? ->true or false
+ * stat.setuid? -> true or false
*
* Returns <code>true</code> if <i>stat</i> has the set-user-id
* permission bit set, <code>false</code> if it doesn't or if the
@@ -4780,7 +4780,7 @@ rb_stat_suid(VALUE obj)
/*
* call-seq:
- * stat.setgid? ->true or false
+ * stat.setgid? -> true or false
*
* Returns <code>true</code> if <i>stat</i> has the set-group-id
* permission bit set, <code>false</code> if it doesn't or if the
@@ -4801,7 +4801,7 @@ rb_stat_sgid(VALUE obj)
/*
* call-seq:
- * stat.sticky? ->true or false
+ * stat.sticky? -> true or false
*
* Returns <code>true</code> if <i>stat</i> has its sticky bit set,
* <code>false</code> if it doesn't or if the operating system doesn't
diff --git a/hash.c b/hash.c
index 55809e3375..84d9eb3aec 100644
--- a/hash.c
+++ b/hash.c
@@ -290,9 +290,9 @@ default_proc_arity_check(VALUE proc)
/*
* call-seq:
- * Hash.new => hash
- * Hash.new(obj) => aHash
- * Hash.new {|hash, key| block } => aHash
+ * Hash.new -> new_hash
+ * Hash.new(obj) -> new_hash
+ * Hash.new {|hash, key| block } -> new_hash
*
* Returns a new, empty hash. If this hash is subsequently accessed by
* a key that doesn't correspond to a hash entry, the value returned
@@ -348,9 +348,9 @@ rb_hash_initialize(int argc, VALUE *argv, VALUE hash)
/*
* call-seq:
- * Hash[ key, value, ... ] => hash
- * Hash[ [ [key, value], ... ] ] => hash
- * Hash[ object ] => hash
+ * Hash[ key, value, ... ] -> new_hash
+ * Hash[ [ [key, value], ... ] ] -> new_hash
+ * Hash[ object ] -> new_hash
*
* Creates a new hash populated with the given objects. Equivalent to
* the literal <code>{ <i>key</i> => <i>value</i>, ... }</code>. In the first
@@ -485,7 +485,7 @@ rb_hash_rehash(VALUE hash)
/*
* call-seq:
- * hsh[key] => value
+ * hsh[key] -> value
*
* Element Reference---Retrieves the <i>value</i> object corresponding
* to the <i>key</i> object. If not found, returns the default value (see
@@ -527,8 +527,8 @@ rb_hash_lookup(VALUE hash, VALUE key)
/*
* call-seq:
- * hsh.fetch(key [, default] ) => obj
- * hsh.fetch(key) {| key | block } => obj
+ * hsh.fetch(key [, default] ) -> obj
+ * hsh.fetch(key) {| key | block } -> obj
*
* Returns a value from the hash for the given key. If the key can't be
* found, there are several options: With no other arguments, it will
@@ -589,7 +589,7 @@ rb_hash_fetch(VALUE hash, VALUE key)
/*
* call-seq:
- * hsh.default(key=nil) => obj
+ * hsh.default(key=nil) -> obj
*
* Returns the default value, the value that would be returned by
* <i>hsh</i>[<i>key</i>] if <i>key</i> did not exist in <i>hsh</i>.
@@ -624,7 +624,7 @@ rb_hash_default(int argc, VALUE *argv, VALUE hash)
/*
* call-seq:
- * hsh.default = obj => obj
+ * hsh.default = obj -> obj
*
* Sets the default value, the value returned for a key that does not
* exist in the hash. It is not possible to set the default to a
@@ -679,7 +679,7 @@ VALUE rb_obj_is_proc(VALUE proc);
/*
* call-seq:
- * hsh.default_proc = proc_obj => proc_obj
+ * hsh.default_proc = proc_obj -> proc_obj
*
* Sets the default proc to be executed on each key lookup.
*
@@ -723,7 +723,7 @@ key_i(VALUE key, VALUE value, VALUE arg)
/*
* call-seq:
- * hsh.key(value) => key
+ * hsh.key(value) -> key
*
* Returns the key for a given value. If not found, returns <code>nil</code>.
*
@@ -774,8 +774,8 @@ rb_hash_delete_key(VALUE hash, VALUE key)
/*
* call-seq:
- * hsh.delete(key) => value
- * hsh.delete(key) {| key | block } => value
+ * hsh.delete(key) -> value
+ * hsh.delete(key) {| key | block } -> value
*
* Deletes and returns a key-value pair from <i>hsh</i> whose key is
* equal to <i>key</i>. If the key is not found, returns the
@@ -945,7 +945,7 @@ rb_hash_reject(VALUE hash)
/*
* call-seq:
- * hsh.values_at(key, ...) => array
+ * hsh.values_at(key, ...) -> array
*
* Return an array containing the values associated with the given keys.
* Also see <code>Hash.select</code>.
@@ -977,8 +977,8 @@ select_i(VALUE key, VALUE value, VALUE result)
/*
* call-seq:
- * hsh.select {|key, value| block} => a_hash
- * hsh.select => an_enumerator
+ * hsh.select {|key, value| block} -> a_hash
+ * hsh.select -> an_enumerator
*
* Returns a new hash consisting of entries for which the block returns true.
*
@@ -1090,8 +1090,8 @@ rb_hash_clear(VALUE hash)
/*
* call-seq:
- * hsh[key] = value => value
- * hsh.store(key, value) => value
+ * hsh[key] = value -> value
+ * hsh.store(key, value) -> value
*
* Element Assignment---Associates the value given by
* <i>value</i> with the key given by <i>key</i>.
@@ -1167,8 +1167,8 @@ rb_hash_replace(VALUE hash, VALUE hash2)
/*
* call-seq:
- * hsh.length => fixnum
- * hsh.size => fixnum
+ * hsh.length -> fixnum
+ * hsh.size -> fixnum
*
* Returns the number of key-value pairs in the hash.
*
@@ -1189,7 +1189,7 @@ rb_hash_size(VALUE hash)
/*
* call-seq:
- * hsh.empty? => true or false
+ * hsh.empty? -> true or false
*
* Returns <code>true</code> if <i>hsh</i> contains no key-value pairs.
*
@@ -1377,8 +1377,8 @@ inspect_hash(VALUE hash, VALUE dummy, int recur)
/*
* call-seq:
- * hsh.to_s => string
- * hsh.inspect => string
+ * hsh.to_s -> string
+ * hsh.inspect -> string
*
* Return the contents of this hash as a string.
*
@@ -1417,7 +1417,7 @@ keys_i(VALUE key, VALUE value, VALUE ary)
/*
* call-seq:
- * hsh.keys => array
+ * hsh.keys -> array
*
* Returns a new array populated with the keys from this hash. See also
* <code>Hash#values</code>.
@@ -1448,7 +1448,7 @@ values_i(VALUE key, VALUE value, VALUE ary)
/*
* call-seq:
- * hsh.values => array
+ * hsh.values -> array
*
* Returns a new array populated with the values from <i>hsh</i>. See
* also <code>Hash#keys</code>.
@@ -1471,10 +1471,10 @@ rb_hash_values(VALUE hash)
/*
* call-seq:
- * hsh.has_key?(key) => true or false
- * hsh.include?(key) => true or false
- * hsh.key?(key) => true or false
- * hsh.member?(key) => true or false
+ * hsh.has_key?(key) -> true or false
+ * hsh.include?(key) -> true or false
+ * hsh.key?(key) -> true or false
+ * hsh.member?(key) -> true or false
*
* Returns <code>true</code> if the given key is present in <i>hsh</i>.
*
@@ -1510,8 +1510,8 @@ rb_hash_search_value(VALUE key, VALUE value, VALUE arg)
/*
* call-seq:
- * hsh.has_value?(value) => true or false
- * hsh.value?(value) => true or false
+ * hsh.has_value?(value) -> true or false
+ * hsh.value?(value) -> true or false
*
* Returns <code>true</code> if the given value is present for some key
* in <i>hsh</i>.
@@ -1603,7 +1603,7 @@ hash_equal(VALUE hash1, VALUE hash2, int eql)
/*
* call-seq:
- * hsh == other_hash => true or false
+ * hsh == other_hash -> true or false
*
* Equality---Two hashes are equal if they each contain the same number
* of keys and if each key-value pair is equal to (according to
@@ -1689,7 +1689,7 @@ rb_hash_invert_i(VALUE key, VALUE value, VALUE hash)
/*
* call-seq:
- * hsh.invert -> aHash
+ * hsh.invert -> new_hash
*
* Returns a new hash created by using <i>hsh</i>'s values as keys, and
* the keys as values.
@@ -1731,10 +1731,10 @@ rb_hash_update_block_i(VALUE key, VALUE value, VALUE hash)
/*
* call-seq:
- * hsh.merge!(other_hash) => hsh
- * hsh.update(other_hash) => hsh
- * hsh.merge!(other_hash){|key, oldval, newval| block} => hsh
- * hsh.update(other_hash){|key, oldval, newval| block} => hsh
+ * hsh.merge!(other_hash) -> hsh
+ * hsh.update(other_hash) -> hsh
+ * hsh.merge!(other_hash){|key, oldval, newval| block} -> hsh
+ * hsh.update(other_hash){|key, oldval, newval| block} -> hsh
*
* Adds the contents of <i>other_hash</i> to <i>hsh</i>. If no
* block is specified, entries with duplicate keys are overwritten
@@ -1768,8 +1768,8 @@ rb_hash_update(VALUE hash1, VALUE hash2)
/*
* call-seq:
- * hsh.merge(other_hash) -> a_hash
- * hsh.merge(other_hash){|key, oldval, newval| block} -> a_hash
+ * hsh.merge(other_hash) -> new_hash
+ * hsh.merge(other_hash){|key, oldval, newval| block} -> new_hash
*
* Returns a new hash containing the contents of <i>other_hash</i> and
* the contents of <i>hsh</i>. If no block is specified, the value for
@@ -1900,7 +1900,7 @@ rb_hash_flatten(int argc, VALUE *argv, VALUE hash)
/*
* call-seq:
- * hsh.compare_by_identity => hsh
+ * hsh.compare_by_identity -> hsh
*
* Makes <i>hsh</i> compare its keys by their identity, i.e. it
* will consider exact same objects as same keys.
@@ -1925,7 +1925,7 @@ rb_hash_compare_by_id(VALUE hash)
/*
* call-seq:
- * hsh.compare_by_identity? => true or false
+ * hsh.compare_by_identity? -> true or false
*
* Returns <code>true</code> if <i>hsh</i> will compare its keys by
* their identity. Also see <code>Hash#compare_by_identity</code>.
diff --git a/io.c b/io.c
index 6fd0d47d51..80474a17fe 100644
--- a/io.c
+++ b/io.c
@@ -312,7 +312,7 @@ rb_io_get_write_io(VALUE io)
/*
* call-seq:
- * IO.try_convert(obj) -> io or nil
+ * IO.try_convert(obj) -> io or nil
*
* Try to convert <i>obj</i> into an IO, using to_io method.
* Returns converted IO or nil if <i>obj</i> cannot be converted
@@ -970,7 +970,7 @@ io_write(VALUE io, VALUE str, int nosync)
/*
* call-seq:
- * ios.write(string) ->integer
+ * ios.write(string) -> integer
*
* Writes the given string to <em>ios</em>. The stream must be opened
* for writing. If the argument is not a string, it will be converted
@@ -1000,7 +1000,7 @@ rb_io_write(VALUE io, VALUE str)
/*
* call-seq:
- * ios << obj ->ios
+ * ios << obj -> ios
*
* String Output---Writes <i>obj</i> to <em>ios</em>.
* <i>obj</i> will be converted to a string using
@@ -1023,7 +1023,7 @@ rb_io_addstr(VALUE io, VALUE str)
/*
* call-seq:
- * ios.flush ->ios
+ * ios.flush -> ios
*
* Flushes any buffered data within <em>ios</em> to the underlying
* operating system (note that this is Ruby internal buffering only;
@@ -1065,8 +1065,8 @@ rb_io_flush(VALUE io)
/*
* call-seq:
- * ios.pos ->integer
- * ios.tell ->integer
+ * ios.pos -> integer
+ * ios.tell -> integer
*
* Returns the current offset (in bytes) of <em>ios</em>.
*
@@ -1105,7 +1105,7 @@ rb_io_seek(VALUE io, VALUE offset, int whence)
/*
* call-seq:
- * ios.seek(amount, whence=IO::SEEK_SET) -> 0
+ * ios.seek(amount, whence=IO::SEEK_SET) -> 0
*
* Seeks to a given offset <i>anInteger</i> in the stream according to
* the value of <i>whence</i>:
@@ -1139,7 +1139,7 @@ rb_io_seek_m(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * ios.pos = integer ->integer
+ * ios.pos = integer -> integer
*
* Seeks to the given position (in bytes) in <em>ios</em>.
*
@@ -1166,7 +1166,7 @@ static void clear_readconv(rb_io_t *fptr);
/*
* call-seq:
- * ios.rewind ->0
+ * ios.rewind -> 0
*
* Positions <em>ios</em> to the beginning of input, resetting
* <code>lineno</code> to zero.
@@ -1234,8 +1234,8 @@ io_fillbuf(rb_io_t *fptr)
/*
* call-seq:
- * ios.eof ->true or false
- * ios.eof? ->true or false
+ * ios.eof -> true or false
+ * ios.eof? -> true or false
*
* Returns true if <em>ios</em> is at end of file that means
* there are no more data to read.
@@ -1285,7 +1285,7 @@ rb_io_eof(VALUE io)
/*
* call-seq:
- * ios.sync ->true or false
+ * ios.sync -> true or false
*
* Returns the current ``sync mode'' of <em>ios</em>. When sync mode is
* true, all output is immediately flushed to the underlying operating
@@ -1308,7 +1308,7 @@ rb_io_sync(VALUE io)
/*
* call-seq:
- * ios.sync = boolean ->boolean
+ * ios.sync = boolean -> boolean
*
* Sets the ``sync mode'' to <code>true</code> or <code>false</code>.
* When sync mode is true, all output is immediately flushed to the
@@ -1340,7 +1340,7 @@ rb_io_set_sync(VALUE io, VALUE sync)
#ifdef HAVE_FSYNC
/*
* call-seq:
- * ios.fsync ->0 or nil
+ * ios.fsync -> 0 or nil
*
* Immediately writes all buffered data in <em>ios</em> to disk.
* Note that <code>fsync</code> differs from
@@ -1373,7 +1373,7 @@ rb_io_fsync(VALUE io)
#ifdef HAVE_FDATASYNC
/*
* call-seq:
- * ios.fdatasync ->0 or nil
+ * ios.fdatasync -> 0 or nil
*
* Immediately writes all buffered data in <em>ios</em> to disk.
*
@@ -1401,8 +1401,8 @@ rb_io_fdatasync(VALUE io)
/*
* call-seq:
- * ios.fileno ->fixnum
- * ios.to_i ->fixnum
+ * ios.fileno -> fixnum
+ * ios.to_i -> fixnum
*
* Returns an integer representing the numeric file descriptor for
* <em>ios</em>.
@@ -1425,7 +1425,7 @@ rb_io_fileno(VALUE io)
/*
* call-seq:
- * ios.pid ->fixnum
+ * ios.pid -> fixnum
*
* Returns the process ID of a child process associated with
* <em>ios</em>. This will be set by <code>IO.popen</code>.
@@ -1457,7 +1457,7 @@ rb_io_pid(VALUE io)
/*
* call-seq:
- * ios.inspect ->string
+ * ios.inspect -> string
*
* Return a string describing this IO object.
*/
@@ -1495,7 +1495,7 @@ rb_io_inspect(VALUE obj)
/*
* call-seq:
- * ios.to_io -> ios
+ * ios.to_io -> ios
*
* Returns <em>ios</em>.
*/
@@ -1884,8 +1884,8 @@ io_getpartial(int argc, VALUE *argv, VALUE io, int nonblock)
/*
* call-seq:
- * ios.readpartial(maxlen) ->string
- * ios.readpartial(maxlen, outbuf) ->outbuf
+ * ios.readpartial(maxlen) -> string
+ * ios.readpartial(maxlen, outbuf) -> outbuf
*
* Reads at most <i>maxlen</i> bytes from the I/O stream.
* It blocks only if <em>ios</em> has no data immediately available.
@@ -1953,8 +1953,8 @@ io_readpartial(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * ios.read_nonblock(maxlen) ->string
- * ios.read_nonblock(maxlen, outbuf) ->outbuf
+ * ios.read_nonblock(maxlen) -> string
+ * ios.read_nonblock(maxlen, outbuf) -> outbuf
*
* Reads at most <i>maxlen</i> bytes from <em>ios</em> using
* the read(2) system call after O_NONBLOCK is set for
@@ -2014,7 +2014,7 @@ io_read_nonblock(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * ios.write_nonblock(string) ->integer
+ * ios.write_nonblock(string) -> integer
*
* Writes the given string to <em>ios</em> using
* the write(2) system call after O_NONBLOCK is set for
@@ -2096,7 +2096,7 @@ rb_io_write_nonblock(VALUE io, VALUE str)
/*
* call-seq:
- * ios.read([length [, buffer]]) ->string, buffer, or nil
+ * ios.read([length [, buffer]]) -> string, buffer, or nil
*
* Reads <i>length</i> bytes from the I/O stream.
*
@@ -2554,8 +2554,8 @@ rb_io_gets(VALUE io)
/*
* call-seq:
- * ios.gets(sep=$/) ->string or nil
- * ios.gets(limit) ->string or nil
+ * ios.gets(sep=$/) -> string or nil
+ * ios.gets(limit) -> string or nil
* ios.gets(sep, limit)->string or nil
*
* Reads the next ``line'' from the I/O stream; lines are separated by
@@ -2586,7 +2586,7 @@ rb_io_gets_m(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * ios.lineno ->integer
+ * ios.lineno -> integer
*
* Returns the current line number in <em>ios</em>. The stream must be
* opened for reading. <code>lineno</code> counts the number of times
@@ -2615,7 +2615,7 @@ rb_io_lineno(VALUE io)
/*
* call-seq:
- * ios.lineno = integer ->integer
+ * ios.lineno = integer -> integer
*
* Manually sets the current line number to the given value.
* <code>$.</code> is updated only on the next read.
@@ -2643,8 +2643,8 @@ rb_io_set_lineno(VALUE io, VALUE lineno)
/*
* call-seq:
- * ios.readline(sep=$/) ->string
- * ios.readline(limit) ->string
+ * ios.readline(sep=$/) -> string
+ * ios.readline(limit) -> string
* ios.readline(sep, limit)->string
*
* Reads a line as with <code>IO#gets</code>, but raises an
@@ -2664,8 +2664,8 @@ rb_io_readline(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * ios.readlines(sep=$/) ->array
- * ios.readlines(limit) ->array
+ * ios.readlines(sep=$/) -> array
+ * ios.readlines(limit) -> array
* ios.readlines(sep, limit)->array
*
* Reads all of the lines in <em>ios</em>, and returns them in
@@ -2696,20 +2696,20 @@ rb_io_readlines(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * ios.each(sep=$/) {|line| block } ->ios
- * ios.each(limit) {|line| block } ->ios
- * ios.each(sep,limit) {|line| block } ->ios
- * ios.each(...) ->an_enumerator
+ * ios.each(sep=$/) {|line| block } -> ios
+ * ios.each(limit) {|line| block } -> ios
+ * ios.each(sep,limit) {|line| block } -> ios
+ * ios.each(...) -> an_enumerator
*
- * ios.each_line(sep=$/) {|line| block } ->ios
- * ios.each_line(limit) {|line| block } ->ios
+ * ios.each_line(sep=$/) {|line| block } -> ios
+ * ios.each_line(limit) {|line| block } -> ios
* ios.each_line(sep,limit) {|line| block }->ios
- * ios.each_line(...) ->an_enumerator
+ * ios.each_line(...) -> an_enumerator
*
- * ios.lines(sep=$/) {|line| block } ->ios
- * ios.lines(limit) {|line| block } ->ios
- * ios.lines(sep,limit) {|line| block } ->ios
- * ios.lines(...) ->an_enumerator
+ * ios.lines(sep=$/) {|line| block } -> ios
+ * ios.lines(limit) {|line| block } -> ios
+ * ios.lines(sep,limit) {|line| block } -> ios
+ * ios.lines(...) -> an_enumerator
*
* Executes the block for every line in <em>ios</em>, where lines are
* separated by <i>sep</i>. <em>ios</em> must be opened for
@@ -2744,11 +2744,11 @@ rb_io_each_line(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * ios.bytes {|byte| block } ->ios
- * ios.bytes ->an_enumerator
+ * ios.bytes {|byte| block } -> ios
+ * ios.bytes -> an_enumerator
*
- * ios.each_byte {|byte| block } ->ios
- * ios.each_byte ->an_enumerator
+ * ios.each_byte {|byte| block } -> ios
+ * ios.each_byte -> an_enumerator
*
* Calls the given block once for each byte (0..255) in <em>ios</em>,
* passing the byte as an argument. The stream must be opened for
@@ -2893,11 +2893,11 @@ io_getc(rb_io_t *fptr, rb_encoding *enc)
/*
* call-seq:
- * ios.chars {|c| block } ->ios
- * ios.chars ->an_enumerator
+ * ios.chars {|c| block } -> ios
+ * ios.chars -> an_enumerator
*
- * ios.each_char {|c| block } ->ios
- * ios.each_char ->an_enumerator
+ * ios.each_char {|c| block } -> ios
+ * ios.each_char -> an_enumerator
*
* Calls the given block once for each character in <em>ios</em>,
* passing the character as an argument. The stream must be opened for
@@ -2931,10 +2931,10 @@ rb_io_each_char(VALUE io)
/*
* call-seq:
- * ios.each_codepoint {|c| block } ->ios
- * ios.codepoints {|c| block } ->ios
- * ios.each_codepoint ->an_enumerator
- * ios.codepoints ->an_enumerator
+ * ios.each_codepoint {|c| block } -> ios
+ * ios.codepoints {|c| block } -> ios
+ * ios.each_codepoint -> an_enumerator
+ * ios.codepoints -> an_enumerator
*
* Passes the <code>Integer</code> ordinal of each character in <i>ios</i>,
* passing the codepoint as an argument. The stream must be opened for
@@ -3027,7 +3027,7 @@ rb_io_each_codepoint(VALUE io)
/*
* call-seq:
- * ios.getc ->string or nil
+ * ios.getc -> string or nil
*
* Reads a one-character string from <em>ios</em>. Returns
* <code>nil</code> if called at end of file.
@@ -3053,7 +3053,7 @@ rb_io_getc(VALUE io)
/*
* call-seq:
- * ios.readchar ->string
+ * ios.readchar -> string
*
* Reads a one-character string from <em>ios</em>. Raises an
* <code>EOFError</code> on end of file.
@@ -3076,7 +3076,7 @@ rb_io_readchar(VALUE io)
/*
* call-seq:
- * ios.getbyte ->fixnum or nil
+ * ios.getbyte -> fixnum or nil
*
* Gets the next 8-bit byte (0..255) from <em>ios</em>. Returns
* <code>nil</code> if called at end of file.
@@ -3113,7 +3113,7 @@ rb_io_getbyte(VALUE io)
/*
* call-seq:
- * ios.readbyte ->fixnum
+ * ios.readbyte -> fixnum
*
* Reads a byte as with <code>IO#getbyte</code>, but raises an
* <code>EOFError</code> on end of file.
@@ -3132,8 +3132,8 @@ rb_io_readbyte(VALUE io)
/*
* call-seq:
- * ios.ungetbyte(string) ->nil
- * ios.ungetbyte(integer) ->nil
+ * ios.ungetbyte(string) -> nil
+ * ios.ungetbyte(integer) -> nil
*
* Pushes back bytes (passed as a parameter) onto <em>ios</em>,
* such that a subsequent buffered read will return it. Only one byte
@@ -3169,7 +3169,7 @@ rb_io_ungetbyte(VALUE io, VALUE b)
/*
* call-seq:
- * ios.ungetc(string) ->nil
+ * ios.ungetc(string) -> nil
*
* Pushes back one character (passed as a parameter) onto <em>ios</em>,
* such that a subsequent buffered character read will return it. Only one character
@@ -3230,8 +3230,8 @@ rb_io_ungetc(VALUE io, VALUE c)
/*
* call-seq:
- * ios.isatty ->true or false
- * ios.tty? ->true or false
+ * ios.isatty -> true or false
+ * ios.tty? -> true or false
*
* Returns <code>true</code> if <em>ios</em> is associated with a
* terminal device (tty), <code>false</code> otherwise.
@@ -3254,7 +3254,7 @@ rb_io_isatty(VALUE io)
#if defined(HAVE_FCNTL) && defined(F_GETFD) && defined(F_SETFD) && defined(FD_CLOEXEC)
/*
* call-seq:
- * ios.close_on_exec? ->true or false
+ * ios.close_on_exec? -> true or false
*
* Returns <code>true</code> if <em>ios</em> will be closed on exec.
*
@@ -3296,7 +3296,7 @@ rb_io_close_on_exec_p(VALUE io)
#if defined(HAVE_FCNTL) && defined(F_GETFD) && defined(F_SETFD) && defined(FD_CLOEXEC)
/*
* call-seq:
- * ios.close_on_exec = bool ->true or false
+ * ios.close_on_exec = bool -> true or false
*
* Sets a close-on-exec flag.
*
@@ -3582,7 +3582,7 @@ rb_io_close(VALUE io)
/*
* call-seq:
- * ios.close ->nil
+ * ios.close -> nil
*
* Closes <em>ios</em> and flushes any pending writes to the operating
* system. The stream is unavailable for any further data operations;
@@ -3619,7 +3619,7 @@ io_close(VALUE io)
/*
* call-seq:
- * ios.closed? ->true or false
+ * ios.closed? -> true or false
*
* Returns <code>true</code> if <em>ios</em> is completely closed (for
* duplex streams, both reader and writer), <code>false</code>
@@ -3658,7 +3658,7 @@ rb_io_closed(VALUE io)
/*
* call-seq:
- * ios.close_read ->nil
+ * ios.close_read -> nil
*
* Closes the read end of a duplex I/O stream (i.e., one that contains
* both a read and a write stream, such as a pipe). Will raise an
@@ -3715,7 +3715,7 @@ rb_io_close_read(VALUE io)
/*
* call-seq:
- * ios.close_write ->nil
+ * ios.close_write -> nil
*
* Closes the write end of a duplex I/O stream (i.e., one that contains
* both a read and a write stream, such as a pipe). Will raise an
@@ -3770,7 +3770,7 @@ rb_io_close_write(VALUE io)
/*
* call-seq:
- * ios.sysseek(offset, whence=IO::SEEK_SET) ->integer
+ * ios.sysseek(offset, whence=IO::SEEK_SET) -> integer
*
* Seeks to a given <i>offset</i> in the stream according to the value
* of <i>whence</i> (see <code>IO#seek</code> for values of
@@ -3810,7 +3810,7 @@ rb_io_sysseek(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * ios.syswrite(string) ->integer
+ * ios.syswrite(string) -> integer
*
* Writes the given string to <em>ios</em> using a low-level write.
* Returns the number of bytes written. Do not mix with other methods
@@ -3851,7 +3851,7 @@ rb_io_syswrite(VALUE io, VALUE str)
/*
* call-seq:
- * ios.sysread(integer[, outbuf]) ->string
+ * ios.sysread(integer[, outbuf]) -> string
*
* Reads <i>integer</i> bytes from <em>ios</em> using a low-level
* read and returns them as a string. Do not mix with other methods
@@ -3957,7 +3957,7 @@ rb_io_ascii8bit_binmode(VALUE io)
/*
* call-seq:
- * ios.binmode ->ios
+ * ios.binmode -> ios
*
* Puts <em>ios</em> into binary mode.
* Once a stream is in binary mode, it cannot be reset to nonbinary mode.
@@ -3983,7 +3983,7 @@ rb_io_binmode_m(VALUE io)
/*
* call-seq:
- * ios.binmode? ->true or false
+ * ios.binmode? -> true or false
*
* Returns <code>true</code> if <em>ios</em> is binmode.
*/
@@ -5217,7 +5217,7 @@ pop_last_hash(int *argc_p, VALUE *argv)
/*
* call-seq:
- * IO.popen(cmd, mode="r" [, opt]) ->io
+ * IO.popen(cmd, mode="r" [, opt]) -> io
* IO.popen(cmd, mode="r" [, opt]) {|io| block }->obj
*
* Runs the specified command as a subprocess; the subprocess's
@@ -5388,8 +5388,8 @@ rb_open_file(int argc, VALUE *argv, VALUE io)
* Document-method: File::open
*
* call-seq:
- * File.open(filename, mode="r" [, opt]) ->file
- * File.open(filename [, mode [, perm]] [, opt]) ->file
+ * File.open(filename, mode="r" [, opt]) -> file
+ * File.open(filename [, mode [, perm]] [, opt]) -> file
* File.open(filename, mode="r" [, opt]) {|file| block }->obj
* File.open(filename [, mode [, perm]] [, opt]) {|file| block }->obj
*
@@ -5404,7 +5404,7 @@ rb_open_file(int argc, VALUE *argv, VALUE io)
* Document-method: IO::open
*
* call-seq:
- * IO.open(fd, mode_string="r" [, opt] ) ->io
+ * IO.open(fd, mode_string="r" [, opt] ) -> io
* IO.open(fd, mode_string="r" [, opt] ) {|io| block }->obj
*
* With no associated block, <code>open</code> is a synonym for
@@ -5429,7 +5429,7 @@ rb_io_s_open(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * IO.sysopen(path, [mode, [perm]]) ->fixnum
+ * IO.sysopen(path, [mode, [perm]]) -> fixnum
*
* Opens the given path, returning the underlying file descriptor as a
* <code>Fixnum</code>.
@@ -5483,8 +5483,8 @@ check_pipe_command(VALUE filename_or_command)
/*
* call-seq:
- * open(path [, mode_enc [, perm]] [, opt] ) ->io or nil
- * open(path [, mode_enc [, perm]] [, opt] ) {|io| block } ->obj
+ * open(path [, mode_enc [, perm]] [, opt] ) -> io or nil
+ * open(path [, mode_enc [, perm]] [, opt] ) {|io| block } -> obj
*
* Creates an <code>IO</code> object connected to the given stream,
* file, or subprocess.
@@ -5748,8 +5748,8 @@ io_reopen(VALUE io, VALUE nfile)
/*
* call-seq:
- * ios.reopen(other_IO) ->ios
- * ios.reopen(path, mode_str) ->ios
+ * ios.reopen(other_IO) -> ios
+ * ios.reopen(path, mode_str) -> ios
*
* Reassociates <em>ios</em> with the I/O stream given in
* <i>other_IO</i> or to a new stream opened on <i>path</i>. This may
@@ -5884,7 +5884,7 @@ rb_io_init_copy(VALUE dest, VALUE io)
/*
* call-seq:
- * ios.printf(format_string [, obj, ...] ) ->nil
+ * ios.printf(format_string [, obj, ...] ) -> nil
*
* Formats and writes to <em>ios</em>, converting parameters under
* control of the format string. See <code>Kernel#sprintf</code>
@@ -5900,8 +5900,8 @@ rb_io_printf(int argc, VALUE *argv, VALUE out)
/*
* call-seq:
- * printf(io, string [, obj ... ] ) ->nil
- * printf(string [, obj ... ] ) ->nil
+ * printf(io, string [, obj ... ] ) -> nil
+ * printf(string [, obj ... ] ) -> nil
*
* Equivalent to:
* io.write(sprintf(string, obj, ...)
@@ -5930,8 +5930,8 @@ rb_f_printf(int argc, VALUE *argv)
/*
* call-seq:
- * ios.print() ->nil
- * ios.print(obj, ...) ->nil
+ * ios.print() -> nil
+ * ios.print(obj, ...) -> nil
*
* Writes the given object(s) to <em>ios</em>. The stream must be
* opened for writing. If the output field separator (<code>$,</code>)
@@ -5977,7 +5977,7 @@ rb_io_print(int argc, VALUE *argv, VALUE out)
/*
* call-seq:
- * print(obj, ...) ->nil
+ * print(obj, ...) -> nil
*
* Prints each object in turn to <code>$stdout</code>. If the output
* field separator (<code>$,</code>) is not +nil+, its
@@ -6007,7 +6007,7 @@ rb_f_print(int argc, VALUE *argv)
/*
* call-seq:
- * ios.putc(obj) ->obj
+ * ios.putc(obj) -> obj
*
* If <i>obj</i> is <code>Numeric</code>, write the character whose
* code is <i>obj</i>, otherwise write the first character of the
@@ -6032,7 +6032,7 @@ rb_io_putc(VALUE io, VALUE ch)
/*
* call-seq:
- * putc(int) ->int
+ * putc(int) -> int
*
* Equivalent to:
*
@@ -6068,7 +6068,7 @@ io_puts_ary(VALUE ary, VALUE out, int recur)
/*
* call-seq:
- * ios.puts(obj, ...) ->nil
+ * ios.puts(obj, ...) -> nil
*
* Writes the given objects to <em>ios</em> as with
* <code>IO#print</code>. Writes a record separator (typically a
@@ -6121,7 +6121,7 @@ rb_io_puts(int argc, VALUE *argv, VALUE out)
/*
* call-seq:
- * puts(obj, ...) ->nil
+ * puts(obj, ...) -> nil
*
* Equivalent to
*
@@ -6154,9 +6154,9 @@ rb_p(VALUE obj) /* for debug print within C code */
/*
* call-seq:
- * p(obj) ->obj
- * p(obj1, obj2, ...) ->[obj, ...]
- * p() ->nil
+ * p(obj) -> obj
+ * p(obj1, obj2, ...) -> [obj, ...]
+ * p() -> nil
*
* For each object, directly writes
* _obj_.+inspect+ followed by the current output
@@ -6194,7 +6194,7 @@ rb_f_p(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * obj.display(port=$>) ->nil
+ * obj.display(port=$>) -> nil
*
* Prints <i>obj</i> on the given port (default <code>$></code>).
* Equivalent to:
@@ -6319,7 +6319,7 @@ rb_io_stdio_file(rb_io_t *fptr)
/*
* call-seq:
- * IO.new(fd [, mode] [, opt]) ->io
+ * IO.new(fd [, mode] [, opt]) -> io
*
* Returns a new <code>IO</code> object (a stream) for the given
* <code>IO</code> object or integer file descriptor and mode
@@ -6463,8 +6463,8 @@ rb_io_initialize(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * File.new(filename, mode="r" [, opt]) ->file
- * File.new(filename [, mode [, perm]] [, opt]) ->file
+ * File.new(filename, mode="r" [, opt]) -> file
+ * File.new(filename [, mode [, perm]] [, opt]) -> file
*
* Opens the file named by _filename_ according to
* _mode_ (default is ``r'') and returns a new
@@ -6524,7 +6524,7 @@ rb_io_s_new(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * IO.for_fd(fd, mode [, opt]) ->io
+ * IO.for_fd(fd, mode [, opt]) -> io
*
* Synonym for <code>IO.new</code>.
*
@@ -6540,7 +6540,7 @@ rb_io_s_for_fd(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * ios.autoclose? ->true or false
+ * ios.autoclose? -> true or false
*
* Returns +true+ if the underlying file descriptor of _ios_ will be
* closed automatically at its finalization, otherwise +false+.
@@ -6557,7 +6557,7 @@ rb_io_autoclose_p(VALUE io)
/*
* call-seq:
- * io.autoclose = bool ->true or false
+ * io.autoclose = bool -> true or false
*
* Sets auto-close flag.
*
@@ -6650,7 +6650,7 @@ argf_initialize_copy(VALUE argf, VALUE orig)
/*
* call-seq:
- * ARGF.lineno = number ->nil
+ * ARGF.lineno = number -> nil
*
* Sets the line number of the current file in +ARGF+ to the given +Integer+.
*
@@ -6897,8 +6897,8 @@ static VALUE argf_gets(int, VALUE *, VALUE);
/*
* call-seq:
- * gets(sep=$/) ->string or nil
- * gets(limit) ->string or nil
+ * gets(sep=$/) -> string or nil
+ * gets(limit) -> string or nil
* gets(sep,limit)->string or nil
*
* Returns (and assigns to <code>$_</code>) the next line from the list
@@ -6939,8 +6939,8 @@ rb_f_gets(int argc, VALUE *argv, VALUE recv)
/*
* call-seq:
- * ARGF.gets(sep=$/) ->String
- * ARGF.gets(limit) ->String
+ * ARGF.gets(sep=$/) -> String
+ * ARGF.gets(limit) -> String
* ARGF.gets(sep, limit)->String
*
* Returns the next line from the current file in +ARGF+.
@@ -6993,8 +6993,8 @@ static VALUE argf_readline(int, VALUE *, VALUE);
/*
* call-seq:
- * readline(sep=$/) ->string
- * readline(limit) ->string
+ * readline(sep=$/) -> string
+ * readline(limit) -> string
* readline(sep, limit)->string
*
* Equivalent to <code>Kernel::gets</code>, except
@@ -7013,8 +7013,8 @@ rb_f_readline(int argc, VALUE *argv, VALUE recv)
/*
* call-seq:
- * ARGF.readline(sep=$/) ->String
- * ARGF.readline(limit) ->String
+ * ARGF.readline(sep=$/) -> String
+ * ARGF.readline(limit) -> String
* ARGF.readline(sep, limit)->String
*
* Returns the next line from the current file in +ARGF+.
@@ -7046,8 +7046,8 @@ static VALUE argf_readlines(int, VALUE *, VALUE);
/*
* call-seq:
- * readlines(sep=$/) ->array
- * readlines(limit) ->array
+ * readlines(sep=$/) -> array
+ * readlines(limit) -> array
* readlines(sep,limit)->array
*
* Returns an array containing the lines returned by calling
@@ -7065,12 +7065,12 @@ rb_f_readlines(int argc, VALUE *argv, VALUE recv)
/*
* call-seq:
- * ARGF.readlines(sep=$/) ->Array
- * ARGF.readlines(limit) ->Array
+ * ARGF.readlines(sep=$/) -> Array
+ * ARGF.readlines(limit) -> Array
* ARGF.readlines(sep, limit)->Array
*
- * ARGF.to_a(sep=$/) ->Array
- * ARGF.to_a(limit) ->Array
+ * ARGF.to_a(sep=$/) -> Array
+ * ARGF.to_a(limit) -> Array
* ARGF.to_a(sep, limit)->Array
*
* Reads +ARGF+'s current file in its entirety, returning an +Array+ of its
@@ -7094,7 +7094,7 @@ argf_readlines(int argc, VALUE *argv, VALUE argf)
/*
* call-seq:
- * `cmd` ->string
+ * `cmd` -> string
*
* Returns the standard output of running _cmd_ in a subshell.
* The built-in syntax <code>%x{...}</code> uses
@@ -7420,7 +7420,7 @@ rb_io_ctl(VALUE io, VALUE req, VALUE arg, int io_p)
/*
* call-seq:
- * ios.ioctl(integer_cmd, arg) ->integer
+ * ios.ioctl(integer_cmd, arg) -> integer
*
* Provides a mechanism for issuing low-level commands to control or
* query I/O devices. Arguments and results are platform dependent. If
@@ -7442,7 +7442,7 @@ rb_io_ioctl(int argc, VALUE *argv, VALUE io)
#ifdef HAVE_FCNTL
/*
* call-seq:
- * ios.fcntl(integer_cmd, arg) ->integer
+ * ios.fcntl(integer_cmd, arg) -> integer
*
* Provides a mechanism for issuing low-level commands to control or
* query file-oriented I/O streams. Arguments and results are platform
@@ -7468,7 +7468,7 @@ rb_io_fcntl(int argc, VALUE *argv, VALUE io)
#if defined(HAVE_SYSCALL) && SIZEOF_LONG == SIZEOF_INT
/*
* call-seq:
- * syscall(fixnum [, args...]) ->integer
+ * syscall(fixnum [, args...]) -> integer
*
* Calls the operating system function identified by _fixnum_,
* passing in the arguments, which must be either +String+
@@ -7655,10 +7655,10 @@ pipe_pair_close(VALUE rw)
/*
* call-seq:
- * IO.pipe -> [read_io, write_io]
- * IO.pipe(ext_enc) -> [read_io, write_io]
- * IO.pipe("ext_enc:int_enc" [, opt]) -> [read_io, write_io]
- * IO.pipe(ext_enc, int_enc [, opt]) -> [read_io, write_io]
+ * IO.pipe -> [read_io, write_io]
+ * IO.pipe(ext_enc) -> [read_io, write_io]
+ * IO.pipe("ext_enc:int_enc" [, opt]) -> [read_io, write_io]
+ * IO.pipe(ext_enc, int_enc [, opt]) -> [read_io, write_io]
*
* IO.pipe(...) {|read_io, write_io| ... }
*
@@ -7822,10 +7822,10 @@ io_s_foreach(struct foreach_arg *arg)
/*
* call-seq:
- * IO.foreach(name, sep=$/ [, open_args]) {|line| block } ->nil
- * IO.foreach(name, limit [, open_args]) {|line| block } ->nil
+ * IO.foreach(name, sep=$/ [, open_args]) {|line| block } -> nil
+ * IO.foreach(name, limit [, open_args]) {|line| block } -> nil
* IO.foreach(name, sep, limit [, open_args]) {|line| block }->nil
- * IO.foreach(...) ->an_enumerator
+ * IO.foreach(...) -> an_enumerator
*
* Executes the block for every line in the named I/O port, where lines
* are separated by <em>sep</em>.
@@ -7866,8 +7866,8 @@ io_s_readlines(struct foreach_arg *arg)
/*
* call-seq:
- * IO.readlines(name, sep=$/ [, open_args]) ->array
- * IO.readlines(name, limit [, open_args]) ->array
+ * IO.readlines(name, sep=$/ [, open_args]) -> array
+ * IO.readlines(name, limit [, open_args]) -> array
* IO.readlines(name, sep, limit [, open_args])->array
*
* Reads the entire file specified by <i>name</i> as individual
@@ -7915,8 +7915,8 @@ seek_before_access(VALUE argp)
/*
* call-seq:
- * IO.read(name, [length [, offset]] ) ->string
- * IO.read(name, [length [, offset]], open_args) ->string
+ * IO.read(name, [length [, offset]] ) -> string
+ * IO.read(name, [length [, offset]], open_args) -> string
*
* Opens the file, optionally seeks to the given <i>offset</i>, then returns
* <i>length</i> bytes (defaulting to the rest of the file).
@@ -7972,7 +7972,7 @@ rb_io_s_read(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * IO.binread(name, [length [, offset]] ) ->string
+ * IO.binread(name, [length [, offset]] ) -> string
*
* Opens the file, optionally seeks to the given <i>offset</i>, then returns
* <i>length</i> bytes (defaulting to the rest of the file).
@@ -8561,7 +8561,7 @@ rb_io_s_copy_stream(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * io.external_encoding ->encoding
+ * io.external_encoding -> encoding
*
* Returns the Encoding object that represents the encoding of the file.
* If io is write mode and no encoding is specified, returns <code>nil</code>.
@@ -8586,7 +8586,7 @@ rb_io_external_encoding(VALUE io)
/*
* call-seq:
- * io.internal_encoding ->encoding
+ * io.internal_encoding -> encoding
*
* Returns the Encoding of the internal string if conversion is
* specified. Otherwise returns nil.
@@ -8604,11 +8604,11 @@ rb_io_internal_encoding(VALUE io)
/*
* call-seq:
- * io.set_encoding(ext_enc) ->io
- * io.set_encoding("ext_enc:int_enc") ->io
- * io.set_encoding(ext_enc, int_enc) ->io
+ * io.set_encoding(ext_enc) -> io
+ * io.set_encoding("ext_enc:int_enc") -> io
+ * io.set_encoding(ext_enc, int_enc) -> io
* io.set_encoding("ext_enc:int_enc", opt)->io
- * io.set_encoding(ext_enc, int_enc, opt) ->io
+ * io.set_encoding(ext_enc, int_enc, opt) -> io
*
* If single argument is specified, read string from io is tagged
* with the encoding specified. If encoding is a colon separated two
@@ -8647,7 +8647,7 @@ rb_stdio_set_default_encoding(void)
/*
* call-seq:
- * ARGF.external_encoding ->encoding
+ * ARGF.external_encoding -> encoding
*
* Returns the external encoding for files read from +ARGF+ as an +Encoding+
* object. The external encoding is the encoding of the text as stored in a
@@ -8672,7 +8672,7 @@ argf_external_encoding(VALUE argf)
/*
* call-seq:
- * ARGF.internal_encoding ->encoding
+ * ARGF.internal_encoding -> encoding
*
* Returns the internal encoding for strings read from +ARGF+ as an
* +Encoding+ object.
@@ -8694,11 +8694,11 @@ argf_internal_encoding(VALUE argf)
/*
* call-seq:
- * ARGF.set_encoding(ext_enc) ->ARGF
- * ARGF.set_encoding("ext_enc:int_enc") ->ARGF
- * ARGF.set_encoding(ext_enc, int_enc) ->ARGF
+ * ARGF.set_encoding(ext_enc) -> ARGF
+ * ARGF.set_encoding("ext_enc:int_enc") -> ARGF
+ * ARGF.set_encoding(ext_enc, int_enc) -> ARGF
* ARGF.set_encoding("ext_enc:int_enc", opt)->ARGF
- * ARGF.set_encoding(ext_enc, int_enc, opt) ->ARGF
+ * ARGF.set_encoding(ext_enc, int_enc, opt) -> ARGF
*
* If single argument is specified, strings read from ARGF are tagged with
* the encoding specified.
@@ -8739,8 +8739,8 @@ argf_set_encoding(int argc, VALUE *argv, VALUE argf)
/*
* call-seq:
- * ARGF.tell ->Integer
- * ARGF.pos ->Integer
+ * ARGF.tell -> Integer
+ * ARGF.pos -> Integer
*
* Returns the current offset (in bytes) of the current file in +ARGF+.
*
@@ -8761,7 +8761,7 @@ argf_tell(VALUE argf)
/*
* call-seq:
- * ARGF.seek(amount, whence=IO::SEEK_SET) -> 0
+ * ARGF.seek(amount, whence=IO::SEEK_SET) -> 0
*
* Seeks to offset _amount_ (an +Integer+) in the +ARGF+ stream according to
* the value of _whence_. See +IO#seek+ for further details.
@@ -8778,7 +8778,7 @@ argf_seek_m(int argc, VALUE *argv, VALUE argf)
/*
* call-seq:
- * ARGF.pos = position ->Integer
+ * ARGF.pos = position -> Integer
*
* Seeks to the position given by _position_ (in bytes) in +ARGF+.
*
@@ -8799,7 +8799,7 @@ argf_set_pos(VALUE argf, VALUE offset)
/*
* call-seq:
- * ARGF.rewind ->0
+ * ARGF.rewind -> 0
*
* Positions the current file to the beginning of input, resetting
* +ARGF.lineno+ to zero.
@@ -8821,8 +8821,8 @@ argf_rewind(VALUE argf)
/*
* call-seq:
- * ARGF.fileno ->fixnum
- * ARGF.to_i ->fixnum
+ * ARGF.fileno -> fixnum
+ * ARGF.to_i -> fixnum
*
* Returns an integer representing the numeric file descriptor for
* the current file. Raises an +ArgumentError+ if there isn't a current file.
@@ -8841,7 +8841,7 @@ argf_fileno(VALUE argf)
/*
* call-seq:
- * ARGF.to_io ->IO
+ * ARGF.to_io -> IO
*
* Returns an +IO+ object representing the current file. This will be a
* +File+ object unless the current file is a stream such as STDIN.
@@ -8861,8 +8861,8 @@ argf_to_io(VALUE argf)
/*
* call-seq:
- * ARGF.eof? ->true or false
- * ARGF.eof ->true or false
+ * ARGF.eof? -> true or false
+ * ARGF.eof -> true or false
*
* Returns true if the current file in +ARGF+ is at end of file, i.e. it has
* no data to read. The stream must be opened for reading or an +IOError+
@@ -8894,7 +8894,7 @@ argf_eof(VALUE argf)
/*
* call-seq:
- * ARGF.read([length [, buffer]]) ->string, buffer, or nil
+ * ARGF.read([length [, buffer]]) -> string, buffer, or nil
*
* Reads _length_ bytes from ARGF. The files named on the command line
* are concatenated and treated as a single file by this method, so when
@@ -8990,8 +8990,8 @@ argf_forward_call(VALUE arg)
/*
* call-seq:
- * ARGF.readpartial(maxlen) ->string
- * ARGF.readpartial(maxlen, outbuf) ->outbuf
+ * ARGF.readpartial(maxlen) -> string
+ * ARGF.readpartial(maxlen, outbuf) -> outbuf
*
* Reads at most _maxlen_ bytes from the ARGF stream. It blocks only if
* +ARGF+ has no data immediately available. If the optional _outbuf_
@@ -9059,7 +9059,7 @@ argf_readpartial(int argc, VALUE *argv, VALUE argf)
/*
* call-seq:
- * ARGF.getc ->String or nil
+ * ARGF.getc -> String or nil
*
* Reads the next character from +ARGF+ and returns it as a +String+. Returns
* +nil+ at the end of the stream.
@@ -9104,7 +9104,7 @@ argf_getc(VALUE argf)
/*
* call-seq:
- * ARGF.getbyte ->Fixnum or nil
+ * ARGF.getbyte -> Fixnum or nil
*
* Gets the next 8-bit byte (0..255) from +ARGF+. Returns +nil+ if called at
* the end of the stream.
@@ -9144,7 +9144,7 @@ argf_getbyte(VALUE argf)
/*
* call-seq:
- * ARGF.readchar ->String or nil
+ * ARGF.readchar -> String or nil
*
* Reads the next character from +ARGF+ and returns it as a +String+. Raises
* an +EOFError+ after the last character of the last file has been read.
@@ -9184,7 +9184,7 @@ argf_readchar(VALUE argf)
/*
* call-seq:
- * ARGF.readbyte ->Fixnum
+ * ARGF.readbyte -> Fixnum
*
* Reads the next 8-bit byte from ARGF and returns it as a +Fixnum+. Raises
* an +EOFError+ after the last byte of the last file has been read.
@@ -9215,17 +9215,17 @@ argf_readbyte(VALUE argf)
/*
* call-seq:
- * ARGF.each(sep=$/) {|line| block } ->ARGF
- * ARGF.each(sep=$/,limit) {|line| block } ->ARGF
- * ARGF.each(...) ->an_enumerator
+ * ARGF.each(sep=$/) {|line| block } -> ARGF
+ * ARGF.each(sep=$/,limit) {|line| block } -> ARGF
+ * ARGF.each(...) -> an_enumerator
*
- * ARGF.each_line(sep=$/) {|line| block } ->ARGF
- * ARGF.each_line(sep=$/,limit) {|line| block } ->ARGF
- * ARGF.each_line(...) ->an_enumerator
+ * ARGF.each_line(sep=$/) {|line| block } -> ARGF
+ * ARGF.each_line(sep=$/,limit) {|line| block } -> ARGF
+ * ARGF.each_line(...) -> an_enumerator
*
- * ARGF.lines(sep=$/) {|line| block } ->ARGF
- * ARGF.lines(sep=$/,limit) {|line| block } ->ARGF
- * ARGF.lines(...) ->an_enumerator
+ * ARGF.lines(sep=$/) {|line| block } -> ARGF
+ * ARGF.lines(sep=$/,limit) {|line| block } -> ARGF
+ * ARGF.lines(...) -> an_enumerator
*
* Returns an enumerator which iterates over each line (separated by _sep_,
* which defaults to your platform's newline character) of each file in
@@ -9262,11 +9262,11 @@ argf_each_line(int argc, VALUE *argv, VALUE argf)
/*
* call-seq:
- * ARGF.bytes {|byte| block } ->ARGF
- * ARGF.bytes ->an_enumerator
+ * ARGF.bytes {|byte| block } -> ARGF
+ * ARGF.bytes -> an_enumerator
*
- * ARGF.each_byte {|byte| block } ->ARGF
- * ARGF.each_byte ->an_enumerator
+ * ARGF.each_byte {|byte| block } -> ARGF
+ * ARGF.each_byte -> an_enumerator
*
* Iterates over each byte of each file in +ARGV+.
* A byte is returned as a +Fixnum+ in the range 0..255.
@@ -9297,11 +9297,11 @@ argf_each_byte(VALUE argf)
/*
* call-seq:
- * ARGF.chars {|char| block } ->ARGF
- * ARGF.chars ->an_enumerator
+ * ARGF.chars {|char| block } -> ARGF
+ * ARGF.chars -> an_enumerator
*
- * ARGF.each_char {|char| block } ->ARGF
- * ARGF.each_char ->an_enumerator
+ * ARGF.each_char {|char| block } -> ARGF
+ * ARGF.each_char -> an_enumerator
*
* Iterates over each character of each file in +ARGF+.
*
@@ -9327,8 +9327,8 @@ argf_each_char(VALUE argf)
/*
* call-seq:
- * ARGF.filename ->String
- * ARGF.path ->String
+ * ARGF.filename -> String
+ * ARGF.path -> String
*
* Returns the current filename. "-" is returned when the current file is
* STDIN.
@@ -9362,7 +9362,7 @@ argf_filename_getter(ID id, VALUE *var)
/*
* call-seq:
- * ARGF.file ->IO or File object
+ * ARGF.file -> IO or File object
*
* Returns the current file as an +IO+ or +File+ object. #<IO:<STDIN>> is
* returned when the current file is STDIN.
@@ -9387,7 +9387,7 @@ argf_file(VALUE argf)
/*
* call-seq:
- * ARGF.binmode ->ARGF
+ * ARGF.binmode -> ARGF
*
* Puts +ARGF+ into binary mode. Once a stream is in binary mode, it cannot
* be reset to non-binary mode. This option has the following effects:
@@ -9408,7 +9408,7 @@ argf_binmode_m(VALUE argf)
/*
* call-seq:
- * ARGF.binmode? ->true or false
+ * ARGF.binmode? -> true or false
*
* Returns true if +ARGF+ is being read in binary mode; false otherwise. (To
* enable binary mode use +ARGF.binmode+.
@@ -9427,7 +9427,7 @@ argf_binmode_p(VALUE argf)
/*
* call-seq:
- * ARGF.skip ->ARGF
+ * ARGF.skip -> ARGF
*
* Sets the current file to the next file in ARGV. If there aren't any more
* files it has no effect.
@@ -9451,7 +9451,7 @@ argf_skip(VALUE argf)
/*
* call-seq:
- * ARGF.close ->ARGF
+ * ARGF.close -> ARGF
*
* Closes the current file and skips to the next in the stream. Trying to
* close a file that has already been closed causes an +IOError+ to be
@@ -9481,7 +9481,7 @@ argf_close_m(VALUE argf)
/*
* call-seq:
- * ARGF.closed? ->true or false
+ * ARGF.closed? -> true or false
*
* Returns _true_ if the current file has been closed; _false_ otherwise. Use
* +ARGF.close+ to actually close the current file.
@@ -9496,7 +9496,7 @@ argf_closed(VALUE argf)
/*
* call-seq:
- * ARGF.to_s ->String
+ * ARGF.to_s -> String
*
* Returns "ARGF".
*/
@@ -9508,7 +9508,7 @@ argf_to_s(VALUE argf)
/*
* call-seq:
- * ARGF.inplace_mode ->String
+ * ARGF.inplace_mode -> String
*
* Returns the file extension appended to the names of modified files under
* inplace-edit mode. This value can be set using +ARGF.inplace_mode=+ or
@@ -9529,7 +9529,7 @@ opt_i_get(ID id, VALUE *var)
/*
* call-seq:
- * ARGF.inplace_mode = ext ->ARGF
+ * ARGF.inplace_mode = ext -> ARGF
*
* Sets the filename extension for inplace editing mode to the given String.
* Each file being edited has this value appended to its filename. The
@@ -9585,7 +9585,7 @@ ruby_set_inplace_mode(const char *suffix)
/*
* call-seq:
- * ARGF.argv ->ARGV
+ * ARGF.argv -> ARGV
*
* Returns the +ARGV+ array, which contains the arguments passed to your
* script, one per element.
diff --git a/load.c b/load.c
index 9e5e3336ee..0bdba6686a 100644
--- a/load.c
+++ b/load.c
@@ -348,7 +348,7 @@ rb_load_protect(VALUE fname, int wrap, int *state)
/*
* call-seq:
- * load(filename, wrap=false) ->true
+ * load(filename, wrap=false) -> true
*
* Loads and executes the Ruby
* program in the file _filename_. If the filename does not
@@ -422,7 +422,7 @@ load_unlock(const char *ftptr, int done)
/*
* call-seq:
- * require(string) ->true or false
+ * require(string) -> true or false
*
* Ruby tries to load the library named _string_, returning
* +true+ if successful. If the filename does not resolve to
@@ -651,7 +651,7 @@ ruby_init_ext(const char *name, void (*init)(void))
/*
* call-seq:
- * mod.autoload(module, filename) ->nil
+ * mod.autoload(module, filename) -> nil
*
* Registers _filename_ to be loaded (using <code>Kernel::require</code>)
* the first time that _module_ (which may be a <code>String</code> or
@@ -675,7 +675,7 @@ rb_mod_autoload(VALUE mod, VALUE sym, VALUE file)
/*
* call-seq:
- * mod.autoload?(name) ->String or nil
+ * mod.autoload?(name) -> String or nil
*
* Returns _filename_ to be loaded if _name_ is registered as
* +autoload+ in the namespace of _mod_.
@@ -694,7 +694,7 @@ rb_mod_autoload_p(VALUE mod, VALUE sym)
/*
* call-seq:
- * autoload(module, filename) ->nil
+ * autoload(module, filename) -> nil
*
* Registers _filename_ to be loaded (using <code>Kernel::require</code>)
* the first time that _module_ (which may be a <code>String</code> or
@@ -715,7 +715,7 @@ rb_f_autoload(VALUE obj, VALUE sym, VALUE file)
/*
* call-seq:
- * autoload?(name) ->String or nil
+ * autoload?(name) -> String or nil
*
* Returns _filename_ to be loaded if _name_ is registered as
* +autoload+.