Skip to content

Doc change #277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions array.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions bignum.c
Original file line number Diff line number Diff line change
Expand Up @@ -3761,6 +3761,7 @@ rb_big_coerce(VALUE x, VALUE y)
/*
* call-seq:
* big.abs -> aBignum
* big.magnitude -> aBignum
*
* Returns the absolute value of <i>big</i>.
*
Expand Down
1 change: 1 addition & 0 deletions complex.c
Original file line number Diff line number Diff line change
Expand Up @@ -2018,6 +2018,7 @@ numeric_arg(VALUE self)
/*
* call-seq:
* num.rect -> array
* num.rectangular -> array
*
* Returns an array; [num, 0].
*/
Expand Down
3 changes: 2 additions & 1 deletion dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <em>dir</em>'s constructor.
*
Expand Down Expand Up @@ -732,7 +733,7 @@ dir_seek(VALUE dir, VALUE pos)

/*
* call-seq:
* dir.pos( integer ) -> integer
* dir.pos = integer -> integer
*
* Synonym for <code>Dir#seek</code>, but returns the position
* parameter.
Expand Down
1 change: 1 addition & 0 deletions encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,7 @@ enc_inspect(VALUE self)
/*
* call-seq:
* enc.name -> string
* enc.to_s -> string
*
* Returns the name of the encoding.
*
Expand Down
3 changes: 3 additions & 0 deletions enumerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
*
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions ext/date/date_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions ext/dbm/dbm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion ext/dl/cfunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions ext/gdbm/gdbm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions ext/io/wait/wait.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions ext/json/generator/generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/ossl_hmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/ossl_ocsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion ext/openssl/ossl_pkey_dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions ext/openssl/ossl_pkey_dsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
6 changes: 4 additions & 2 deletions ext/openssl/ossl_pkey_ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
*
*/
Expand Down Expand Up @@ -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
*
*/
Expand Down
5 changes: 3 additions & 2 deletions ext/openssl/ossl_pkey_rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/ossl_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/ossl_x509store.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 19 additions & 19 deletions ext/sdbm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions ext/socket/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
3 changes: 3 additions & 0 deletions ext/stringio/stringio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ext/win32ole/win32ole.c
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
14 changes: 8 additions & 6 deletions ext/zlib/zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
5 changes: 1 addition & 4 deletions io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>IO</code> objects, waits one or more
Expand Down
1 change: 1 addition & 0 deletions numeric.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,7 @@ flo_div(VALUE x, VALUE y)

/*
* call-seq:
* float.fdiv(numeric) -> float
* float.quo(numeric) -> float
*
* Returns float / numeric.
Expand Down
1 change: 1 addition & 0 deletions proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading