1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* sytle fixes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-06-30 20:20:32 +00:00
parent 72be91b5c0
commit 198c2570e7
8 changed files with 19 additions and 19 deletions

View file

@ -1,9 +1,9 @@
class Object class Object
define_method(:m){} define_method(:m){}
end end
i=0 i=0
while i<6000000 # benchmark loop 2 while i<6000000 # benchmark loop 2
i+=1 i+=1
m; m; m; m; m; m; m; m; m; m; m; m; m; m; m; m;
end end

View file

@ -206,7 +206,7 @@ static ID sivVALUE, sivTAG, sivTAG_CLASS, sivTAGGING, sivINFINITE_LENGTH, sivUNU
* for infinite length values is different in OpenSSL <= 0.9.7 * for infinite length values is different in OpenSSL <= 0.9.7
*/ */
#if OPENSSL_VERSION_NUMBER < 0x00908000L #if OPENSSL_VERSION_NUMBER < 0x00908000L
#define ossl_asn1_object_size(cons, len, tag) (cons) == 2 ? (len) + ASN1_object_size((cons), 0, (tag)) : ASN1_object_size((cons), (len), (tag)) #define ossl_asn1_object_size(cons, len, tag) (cons) == 2 ? (len) + ASN1_object_size((cons), 0, (tag)) : ASN1_object_size((cons), (len), (tag))
#define ossl_asn1_put_object(pp, cons, len, tag, xc) (cons) == 2 ? ASN1_put_object((pp), (cons), 0, (tag), (xc)) : ASN1_put_object((pp), (cons), (len), (tag), (xc)) #define ossl_asn1_put_object(pp, cons, len, tag, xc) (cons) == 2 ? ASN1_put_object((pp), (cons), 0, (tag), (xc)) : ASN1_put_object((pp), (cons), (len), (tag), (xc))
#else #else
#define ossl_asn1_object_size(cons, len, tag) ASN1_object_size((cons), (len), (tag)) #define ossl_asn1_object_size(cons, len, tag) ASN1_object_size((cons), (len), (tag))
@ -1832,7 +1832,7 @@ Init_ossl_asn1()
* OpenSSL::ASN1::EndOfContent instance. * OpenSSL::ASN1::EndOfContent instance.
* *
* Please note that it is not possible to encode Constructive without * Please note that it is not possible to encode Constructive without
* the +infinite_length+ attribute being set to +true+, use * the +infinite_length+ attribute being set to +true+, use
* OpenSSL::ASN1::Sequence or OpenSSL::ASN1::Set in these cases instead. * OpenSSL::ASN1::Sequence or OpenSSL::ASN1::Set in these cases instead.
* *
* === Example - Infinite length OCTET STRING * === Example - Infinite length OCTET STRING

View file

@ -322,7 +322,7 @@ ossl_pkcs7_initialize(int argc, VALUE *argv, VALUE self)
if (!p7) { if (!p7) {
OSSL_BIO_reset(in); OSSL_BIO_reset(in);
p7 = d2i_PKCS7_bio(in, &pkcs); p7 = d2i_PKCS7_bio(in, &pkcs);
if (!p7) if (!p7)
ossl_raise(rb_eArgError, "Could not parse the PKCS7"); ossl_raise(rb_eArgError, "Could not parse the PKCS7");
DATA_PTR(self) = pkcs; DATA_PTR(self) = pkcs;
} }

View file

@ -98,7 +98,7 @@ ossl_pkey_new_from_file(VALUE filename)
* * +pwd+ is an optional password in case +string+ or +file+ is an encrypted * * +pwd+ is an optional password in case +string+ or +file+ is an encrypted
* PEM resource. * PEM resource.
*/ */
static VALUE static VALUE
ossl_pkey_new_from_data(int argc, VALUE *argv, VALUE self) ossl_pkey_new_from_data(int argc, VALUE *argv, VALUE self)
{ {
FILE *fp; FILE *fp;

View file

@ -357,7 +357,7 @@ ossl_dh_to_text(VALUE self)
* per-session information. * per-session information.
* *
* === Example * === Example
* dh = OpenSSL::PKey::DH.new(2048) # has public and private key set * dh = OpenSSL::PKey::DH.new(2048) # has public and private key set
* public_key = dh.public_key # contains only prime and generator * public_key = dh.public_key # contains only prime and generator
* parameters = public_key.to_der # it's safe to publish this * parameters = public_key.to_der # it's safe to publish this
*/ */
@ -574,10 +574,10 @@ Init_ossl_dh()
* dh1 = OpenSSL::PKey::DH.new(2048) * dh1 = OpenSSL::PKey::DH.new(2048)
* params = dh1.public_key.to_der #you may send this publicly to the participating party * params = dh1.public_key.to_der #you may send this publicly to the participating party
* dh2 = OpenSSL::PKey::DH.new(der) * dh2 = OpenSSL::PKey::DH.new(der)
* dh2.generate_key! #generate the per-session key pair * dh2.generate_key! #generate the per-session key pair
* symm_key1 = dh1.compute_key(dh2.pub_key) * symm_key1 = dh1.compute_key(dh2.pub_key)
* symm_key2 = dh2.compute_key(dh1.pub_key) * symm_key2 = dh2.compute_key(dh1.pub_key)
* *
* puts symm_key1 == symm_key2 # => true * puts symm_key1 == symm_key2 # => true
*/ */
cDH = rb_define_class_under(mPKey, "DH", cPKey); cDH = rb_define_class_under(mPKey, "DH", cPKey);

View file

@ -515,7 +515,7 @@ Init_ossl_dsa()
/* Document-class: OpenSSL::PKey::DSA /* Document-class: OpenSSL::PKey::DSA
* *
* DSA, the Digital Signature Algorithm, is specified in NIST's * DSA, the Digital Signature Algorithm, is specified in NIST's
* FIPS 186-3. It is an asymmetric public key algorithm that may be used * FIPS 186-3. It is an asymmetric public key algorithm that may be used
* similar to e.g. RSA. * similar to e.g. RSA.
* Please note that for OpenSSL versions prior to 1.0.0 the digest * Please note that for OpenSSL versions prior to 1.0.0 the digest

View file

@ -1647,7 +1647,7 @@ ossl_ssl_get_verify_result(VALUE self)
* call-seq: * call-seq:
* ssl.client_ca => [x509name, ...] * ssl.client_ca => [x509name, ...]
* *
* Returns the list of client CAs. Please note that in contrast to * Returns the list of client CAs. Please note that in contrast to
* SSLContext#client_ca= no array of X509::Certificate is returned but * SSLContext#client_ca= no array of X509::Certificate is returned but
* X509::Name instances of the CA's subject distinguished name. * X509::Name instances of the CA's subject distinguished name.
* *

View file

@ -5987,7 +5987,7 @@ parser_parse_string(struct parser_params *parser, NODE *quote)
set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
#ifdef RIPPER #ifdef RIPPER
if (!NIL_P(parser->delayed)){ if (!NIL_P(parser->delayed)) {
ptrdiff_t len = lex_p - parser->tokp; ptrdiff_t len = lex_p - parser->tokp;
if (len > 0) { if (len > 0) {
rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc); rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc);