* 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
This commit is contained in:
marcandre 2010-05-17 21:31:22 +00:00
Родитель ef83d7a928
Коммит c1ecff1b1e
6 изменённых файлов: 459 добавлений и 459 удалений

168
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

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

222
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

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

390
io.c

Разница между файлами не показана из-за своего большого размера Загрузить разницу

12
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+.