diff --git a/array.c b/array.c index 76a3a6279db15d..522da842a05280 100644 --- a/array.c +++ b/array.c @@ -1320,6 +1320,9 @@ rb_ary_fetch(int argc, VALUE *argv, VALUE ary) /* * call-seq: + * ary.find_index(obj) -> int or nil + * ary.find_index { |item| block } -> int or nil + * ary.find_index -> Enumerator * ary.index(obj) -> int or nil * ary.index { |item| block } -> int or nil * ary.index -> Enumerator diff --git a/bignum.c b/bignum.c index b2daac75af6088..1b9d184df8be2f 100644 --- a/bignum.c +++ b/bignum.c @@ -3761,6 +3761,7 @@ rb_big_coerce(VALUE x, VALUE y) /* * call-seq: * big.abs -> aBignum + * big.magnitude -> aBignum * * Returns the absolute value of big. * diff --git a/complex.c b/complex.c index f6f63f6ebd1c2d..19c20b356553e1 100644 --- a/complex.c +++ b/complex.c @@ -2018,6 +2018,7 @@ numeric_arg(VALUE self) /* * call-seq: * num.rect -> array + * num.rectangular -> array * * Returns an array; [num, 0]. */ diff --git a/dir.c b/dir.c index 4322344e6bf3d0..33ab7f8ab1de9b 100644 --- a/dir.c +++ b/dir.c @@ -544,6 +544,7 @@ dir_inspect(VALUE dir) /* * call-seq: * dir.path -> string or nil + * dir.to_path -> string or nil * * Returns the path parameter passed to dir's constructor. * @@ -732,7 +733,7 @@ dir_seek(VALUE dir, VALUE pos) /* * call-seq: - * dir.pos( integer ) -> integer + * dir.pos = integer -> integer * * Synonym for Dir#seek, but returns the position * parameter. diff --git a/encoding.c b/encoding.c index 0c92dfedef83d0..3d89d52ea62841 100644 --- a/encoding.c +++ b/encoding.c @@ -992,6 +992,7 @@ enc_inspect(VALUE self) /* * call-seq: * enc.name -> string + * enc.to_s -> string * * Returns the name of the encoding. * diff --git a/enumerator.c b/enumerator.c index 3aa0d2ea783c22..44c574728b199f 100644 --- a/enumerator.c +++ b/enumerator.c @@ -526,6 +526,8 @@ enumerator_with_object_i(VALUE val, VALUE memo, int argc, VALUE *argv) /* * call-seq: + * e.each_with_object(obj) {|(*args), obj| ... } + * e.each_with_object(obj) * e.with_object(obj) {|(*args), obj| ... } * e.with_object(obj) * @@ -1501,6 +1503,7 @@ lazy_flat_map_func(VALUE val, VALUE m, int argc, VALUE *argv) /* * call-seq: + * lazy.collect_concat { |obj| block } -> a_lazy_enumerator * lazy.flat_map { |obj| block } -> a_lazy_enumerator * * Returns a new lazy enumerator with the concatenated results of running diff --git a/ext/date/date_core.c b/ext/date/date_core.c index 914b81eeaa7a72..45c136c234c34f 100644 --- a/ext/date/date_core.c +++ b/ext/date/date_core.c @@ -5935,6 +5935,7 @@ d_lite_prev_day(int argc, VALUE *argv, VALUE self) /* * call-seq: + * d.succ -> date * d.next -> date * * Returns a date object denoting the following day. diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c index 57d227e8ad7c81..27ade017e16df5 100644 --- a/ext/dbm/dbm.c +++ b/ext/dbm/dbm.c @@ -655,6 +655,7 @@ fdbm_store(VALUE obj, VALUE keystr, VALUE valstr) /* * call-seq: * dbm.length -> integer + * dbm.size -> integer * * Returns the number of entries in the database. */ @@ -832,7 +833,10 @@ fdbm_values(VALUE obj) /* * call-seq: + * dbm.include?(key) -> boolean * dbm.has_key?(key) -> boolean + * dbm.member?(key) -> boolean + * dbm.key?(key) -> boolean * * Returns true if the database contains the specified key, false otherwise. */ @@ -859,6 +863,7 @@ fdbm_has_key(VALUE obj, VALUE keystr) /* * call-seq: * dbm.has_value?(value) -> boolean + * dbm.value?(value) -> boolean * * Returns true if the database contains the specified string value, false * otherwise. diff --git a/ext/dl/cfunc.c b/ext/dl/cfunc.c index 2a96b30bed43dc..b68129f8ed0f29 100644 --- a/ext/dl/cfunc.c +++ b/ext/dl/cfunc.c @@ -285,7 +285,9 @@ rb_dlcfunc_set_ptr(VALUE self, VALUE addr) } /* - * call-seq: inspect + * call-seq: + * inspect + * to_s * * Returns a string formatted with an easily readable representation of the * internal state of the DL::CFunc diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c index 9d958d54a28183..45ed9594a73855 100644 --- a/ext/gdbm/gdbm.c +++ b/ext/gdbm/gdbm.c @@ -953,7 +953,9 @@ fgdbm_values(VALUE obj) /* * call-seq: + * gdbm.include?(k) -> true or false * gdbm.has_key?(k) -> true or false + * gdbm.member?(k) -> true or false * gdbm.key?(k) -> true or false * * Returns true if the given key _k_ exists within the database. diff --git a/ext/io/wait/wait.c b/ext/io/wait/wait.c index c7a290fd4f236f..d8bb55fc475fe0 100644 --- a/ext/io/wait/wait.c +++ b/ext/io/wait/wait.c @@ -96,6 +96,8 @@ io_ready_p(VALUE io) * call-seq: * io.wait -> IO, true, false or nil * io.wait(timeout) -> IO, true, false or nil + * io.wait_readable -> IO, true, false or nil + * io.wait_readable(timeout) -> IO, true, false or nil * * Waits until input is available or times out and returns self or nil when * EOF is reached. diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c index ae4593c940f41f..42a16588113b9d 100644 --- a/ext/json/generator/generator.c +++ b/ext/json/generator/generator.c @@ -1178,11 +1178,11 @@ static VALUE cState_array_nl_set(VALUE self, VALUE array_nl) /* -* call-seq: check_circular? -* -* Returns true, if circular data structures should be checked, -* otherwise returns false. -*/ + * call-seq: check_circular? + * + * Returns true, if circular data structures should be checked, + * otherwise returns false. + */ static VALUE cState_check_circular_p(VALUE self) { GET_STATE(self); diff --git a/ext/openssl/ossl_hmac.c b/ext/openssl/ossl_hmac.c index 5220c9e73d3b1c..d30d04ec670a14 100644 --- a/ext/openssl/ossl_hmac.c +++ b/ext/openssl/ossl_hmac.c @@ -206,7 +206,7 @@ ossl_hmac_s_digest(VALUE klass, VALUE digest, VALUE key, VALUE data) /* * call-seq: - * HMAC.digest(digest, key, data) -> aString + * HMAC.hexdigest(digest, key, data) -> aString * */ static VALUE diff --git a/ext/openssl/ossl_ocsp.c b/ext/openssl/ossl_ocsp.c index e82c2d859a709b..4e2e8394a41cc5 100644 --- a/ext/openssl/ossl_ocsp.c +++ b/ext/openssl/ossl_ocsp.c @@ -149,7 +149,7 @@ ossl_ocspreq_add_nonce(int argc, VALUE *argv, VALUE self) * 2: nonces both absent. * 3: nonce present in response only. * 0: nonces both present and not equal. - * -1: nonce in request only. + * -1: nonce in request only. * * For most responders clients can check return > 0. * If responder doesn't handle nonces return != 0 may be diff --git a/ext/openssl/ossl_pkey_dh.c b/ext/openssl/ossl_pkey_dh.c index c8fb40e1ff05d5..a6ae0063f5b338 100644 --- a/ext/openssl/ossl_pkey_dh.c +++ b/ext/openssl/ossl_pkey_dh.c @@ -278,7 +278,9 @@ ossl_dh_is_private(VALUE self) /* * call-seq: + * dh.export -> aString * dh.to_pem -> aString + * dh.to_s -> aString * * Encodes this DH to its PEM encoding. Note that any existing per-session * public/private keys will *not* get encoded, just the Diffie-Hellman @@ -428,7 +430,7 @@ ossl_dh_to_public_key(VALUE self) /* * call-seq: - * dh.check_params -> true | false + * dh.params_ok? -> true | false * * Validates the Diffie-Hellman parameters associated with this instance. * It checks whether a safe prime and a suitable generator are used. If this diff --git a/ext/openssl/ossl_pkey_dsa.c b/ext/openssl/ossl_pkey_dsa.c index ba28ba028d74e4..823b9b66e5a958 100644 --- a/ext/openssl/ossl_pkey_dsa.c +++ b/ext/openssl/ossl_pkey_dsa.c @@ -291,7 +291,9 @@ ossl_dsa_is_private(VALUE self) /* * call-seq: + * dsa.export([cipher, password]) -> aString * dsa.to_pem([cipher, password]) -> aString + * dsa.to_s([cipher, password]) -> aString * * Encodes this DSA to its PEM encoding. * diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c index 8e6d88f60609b3..9d7607ef2f80ad 100644 --- a/ext/openssl/ossl_pkey_ec.c +++ b/ext/openssl/ossl_pkey_ec.c @@ -533,8 +533,8 @@ static VALUE ossl_ec_key_to_string(VALUE self, VALUE ciph, VALUE pass, int forma /* * call-seq: - * key.export => String - * key.export(cipher, pass_phrase) => String + * key.export([cipher, pass_phrase]) => String + * key.to_pem([cipher, pass_phrase]) => String * * Outputs the EC key in PEM encoding. If +cipher+ and +pass_phrase+ are * given they will be used to encrypt the key. +cipher+ must be an @@ -843,6 +843,7 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self) } /* call-seq: + * group1.eql?(group2) => true | false * group1 == group2 => true | false * */ @@ -1312,6 +1313,7 @@ static VALUE ossl_ec_point_initialize(int argc, VALUE *argv, VALUE self) /* * call-seq: + * point1.eql?(point2) => true | false * point1 == point2 => true | false * */ diff --git a/ext/openssl/ossl_pkey_rsa.c b/ext/openssl/ossl_pkey_rsa.c index e395e7108f3149..4c346a042fdcc0 100644 --- a/ext/openssl/ossl_pkey_rsa.c +++ b/ext/openssl/ossl_pkey_rsa.c @@ -291,8 +291,9 @@ ossl_rsa_is_private(VALUE self) /* * call-seq: - * rsa.to_pem => PEM-format String - * rsa.to_pem(cipher, pass_phrase) => PEM-format String + * rsa.export([cipher, pass_phrase]) => PEM-format String + * rsa.to_pem([cipher, pass_phrase]) => PEM-format String + * rsa.to_s([cipher, pass_phrase]) => PEM-format String * * Outputs this keypair in PEM encoding. If +cipher+ and +pass_phrase+ are * given they will be used to encrypt the key. +cipher+ must be an diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index d5c07d79a9964c..e80a14802b5a1f 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -1627,7 +1627,7 @@ ossl_ssl_get_peer_cert_chain(VALUE self) /* * call-seq: -* ssl.version => String +* ssl.ssl_version => String * * Returns a String representing the SSL/TLS version that was negotiated * for the connection, for example "TLSv1.2". diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c index 2afa0cf5956c4f..f59c376574fe07 100644 --- a/ext/openssl/ossl_x509store.c +++ b/ext/openssl/ossl_x509store.c @@ -257,7 +257,7 @@ ossl_x509store_add_path(VALUE self, VALUE dir) /* * call-seq: - * store.set_default_path + * store.set_default_paths * * Adds the default certificates to the certificate store. These certificates * are loaded from the default configuration directory which can usually be diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c index 0fd837db3121de..4eee21573fe189 100644 --- a/ext/sdbm/init.c +++ b/ext/sdbm/init.c @@ -117,11 +117,11 @@ fsdbm_close(VALUE obj) } /* -* call-seq: -* sdbm.closed? -> true or false -* -* Returns +true+ if the database is closed. -*/ + * call-seq: + * sdbm.closed? -> true or false + * + * Returns +true+ if the database is closed. + */ static VALUE fsdbm_closed(VALUE obj) { @@ -142,20 +142,20 @@ fsdbm_alloc(VALUE klass) return Data_Wrap_Struct(klass, 0, free_sdbm, 0); } /* -* call-seq: -* SDBM.new(filename, mode = 0666) -* -* Creates a new database handle by opening the given +filename+. SDBM actually -* uses two physical files, with extensions '.dir' and '.pag'. These extensions -* will automatically be appended to the +filename+. -* -* If the file does not exist, a new file will be created using the given -* +mode+, unless +mode+ is explicitly set to nil. In the latter case, no -* database will be created. -* -* If the file exists, it will be opened in read/write mode. If this fails, it -* will be opened in read-only mode. -*/ + * call-seq: + * SDBM.new(filename, mode = 0666) + * + * Creates a new database handle by opening the given +filename+. SDBM actually + * uses two physical files, with extensions '.dir' and '.pag'. These extensions + * will automatically be appended to the +filename+. + * + * If the file does not exist, a new file will be created using the given + * +mode+, unless +mode+ is explicitly set to nil. In the latter case, no + * database will be created. + * + * If the file exists, it will be opened in read/write mode. If this fails, it + * will be opened in read-only mode. + */ static VALUE fsdbm_initialize(int argc, VALUE *argv, VALUE obj) { diff --git a/ext/socket/option.c b/ext/socket/option.c index e3e59cf0c52877..4f89c049a45314 100644 --- a/ext/socket/option.c +++ b/ext/socket/option.c @@ -127,6 +127,7 @@ sockopt_optname_m(VALUE self) /* * call-seq: * sockopt.data => string + * sockopt.to_s => string * * returns the socket option data as a string. * diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 26872e0978f30c..0aad063b5ed6e1 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -1331,6 +1331,8 @@ strio_read(int argc, VALUE *argv, VALUE self) /* * call-seq: * strio.sysread(integer[, outbuf]) -> string + * strio.readpartial(integer[, outbuf]) -> string + * strio.read_nonblock(integer[, outbuf]) -> string * * Similar to #read, but raises +EOFError+ at end of string instead of * returning +nil+, as well as IO#sysread does. @@ -1363,6 +1365,7 @@ strio_sysread(int argc, VALUE *argv, VALUE self) /* * call-seq: + * strio.length -> integer * strio.size -> integer * * Returns the size of the buffer string. diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index 5310cbfae1f200..d42b53a8e029b0 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -5750,7 +5750,7 @@ ole_type_visible(ITypeInfo *pTypeInfo) /* * call-seq: - * WIN32OLE_TYPE#visible #=> true or false + * WIN32OLE_TYPE#visible? #=> true or false * * Returns true if the OLE class is public. * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index e5a1e670f70441..64a3e697c63981 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1293,12 +1293,8 @@ rb_zstream_finish(VALUE obj) /* * call-seq: - * flush_next_out -> String - * flush_next_out { |chunk| ... } -> nil + * flush_next_in -> input * - * Flushes output buffer and returns all data in that buffer. If a block is - * given each chunk is yielded to the block until the current output buffer - * has been flushed. */ static VALUE rb_zstream_flush_next_in(VALUE obj) @@ -1313,7 +1309,13 @@ rb_zstream_flush_next_in(VALUE obj) } /* - * Flushes output buffer and returns all data in that buffer. + * call-seq: + * flush_next_out -> String + * flush_next_out { |chunk| ... } -> nil + * + * Flushes output buffer and returns all data in that buffer. If a block is + * given each chunk is yielded to the block until the current output buffer + * has been flushed. */ static VALUE rb_zstream_flush_next_out(VALUE obj) diff --git a/io.c b/io.c index ce6dc70af78df8..e2a66ae57b7277 100644 --- a/io.c +++ b/io.c @@ -8378,10 +8378,7 @@ rb_io_advise(int argc, VALUE *argv, VALUE io) /* * call-seq: - * IO.select(read_array - * [, write_array - * [, error_array - * [, timeout]]]) -> array or nil + * IO.select(read_array[, write_array[, error_array[, timeout]]]) -> array or nil * * Calls select(2) system call. * It monitors given arrays of IO objects, waits one or more diff --git a/numeric.c b/numeric.c index 66820eeed1f1d1..d6cfc8d3127380 100644 --- a/numeric.c +++ b/numeric.c @@ -853,6 +853,7 @@ flo_div(VALUE x, VALUE y) /* * call-seq: + * float.fdiv(numeric) -> float * float.quo(numeric) -> float * * Returns float / numeric. diff --git a/proc.c b/proc.c index 4596003daf813c..9d083df269e637 100644 --- a/proc.c +++ b/proc.c @@ -1052,6 +1052,7 @@ mnew(VALUE klass, VALUE obj, ID id, VALUE mclass, int scope) /* * call-seq: + * meth.eql?(other_meth) -> true or false * meth == other_meth -> true or false * * Two method objects are equal if they are bound to the same diff --git a/re.c b/re.c index 16d7e3450ca874..fe7e3903b5c32f 100644 --- a/re.c +++ b/re.c @@ -2643,6 +2643,7 @@ match_hash(VALUE match) /* * call-seq: * mtch == mtch2 -> true or false + * mtch.eql?(mtch2) -> true or false * * Equality---Two matchdata are equal if their target strings, * patterns, and matched positions are identical. diff --git a/string.c b/string.c index 8b85739e70b5cc..d9a91b5a6f2ed0 100644 --- a/string.c +++ b/string.c @@ -8032,6 +8032,7 @@ sym_casecmp(VALUE sym, VALUE other) /* * call-seq: * sym =~ obj -> fixnum or nil + * sym.match(obj) -> fixnum or nil * * Returns sym.to_s =~ obj. */ @@ -8045,7 +8046,9 @@ sym_match(VALUE sym, VALUE other) /* * call-seq: * sym[idx] -> char - * sym[b, n] -> char + * sym[b, n] -> string + * sym.slice(idx) -> char + * sym.slice(b, n) -> string * * Returns sym.to_s[]. */ @@ -8059,6 +8062,7 @@ sym_aref(int argc, VALUE *argv, VALUE sym) /* * call-seq: * sym.length -> integer + * sym.size -> integer * * Same as sym.to_s.length. */