[前][次][番号順一覧][スレッド一覧]

ruby-changes:17960

From: drbrain <ko1@a...>
Date: Tue, 30 Nov 2010 05:24:05 +0900 (JST)
Subject: [ruby-changes:17960] Ruby:r29977 (trunk): Improve documentation for URI::Common#encode_www_form, OpenSSL::SSL::SSLContext#ssl_version=.

drbrain	2010-11-30 05:23:59 +0900 (Tue, 30 Nov 2010)

  New Revision: 29977

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29977

  Log:
    Improve documentation for URI::Common#encode_www_form, OpenSSL::SSL::SSLContext#ssl_version=.
    
    Add documentation for OpenSSL::SSL::SSLContext#ciphers

  Modified files:
    trunk/ChangeLog
    trunk/ext/openssl/ossl_ssl.c
    trunk/lib/uri/common.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 29976)
+++ ChangeLog	(revision 29977)
@@ -1,3 +1,11 @@
+Tue Nov 30 05:03:44 2010  Eric Hodel  <drbrain@s...>
+
+	* lib/uri/common.rb (encode_www_form, encode_www_form_component):
+	  Improve english in documentation.
+	
+	* ext/openssl/ossl_ssl.c (ssl_version=, ciphers=): Document
+	  #ssl_version=, add documentation for #ciphers=.
+
 Mon Nov 29 22:55:24 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/uri/common.rb (URI::WFKV_): get rid of backtrack explosion
Index: lib/uri/common.rb
===================================================================
--- lib/uri/common.rb	(revision 29976)
+++ lib/uri/common.rb	(revision 29977)
@@ -733,10 +733,11 @@
 
   # Encode given +str+ to URL-encoded form data.
   #
-  # This doesn't convert *, -, ., 0-9, A-Z, _, a-z,
-  # does convert SP to +, and convert others to %XX.
+  # This method doesn't convert *, -, ., 0-9, A-Z, _, a-z, but does convert SP
+  # (ASCII space) to + and converts others to %XX.
   #
-  # This refers http://www.w3.org/TR/html5/forms.html#url-encoded-form-data
+  # This is an implementation of
+  # http://www.w3.org/TR/html5/forms.html#url-encoded-form-data
   #
   # See URI.decode_www_form_component, URI.encode_www_form
   def self.encode_www_form_component(str)
@@ -786,14 +787,16 @@
   #
   # This internally uses URI.encode_www_form_component(str).
   #
-  # This doesn't convert encodings of give items, so convert them before call
-  # this method if you want to send data as other than original encoding or
-  # mixed encoding data. (strings which is encoded in HTML5 ASCII incompatible
-  # encoding is converted to UTF-8)
+  # This method doesn't convert the encoding of given items, so convert them
+  # before call this method if you want to send data as other than original
+  # encoding or mixed encoding data. (Strings which are encoded in an HTML5
+  # ASCII incompatible encoding are converted to UTF-8.)
   #
-  # This doesn't treat files. When you send a file, use multipart/form-data.
+  # This method doesn't handle files.  When you send a file, use
+  # multipart/form-data.
   #
-  # This refers http://www.w3.org/TR/html5/forms.html#url-encoded-form-data
+  # This is an implementation of
+  # http://www.w3.org/TR/html5/forms.html#url-encoded-form-data
   #
   # See URI.encode_www_form_component, URI.decode_www_form
   def self.encode_www_form(enum)
Index: ext/openssl/ossl_ssl.c
===================================================================
--- ext/openssl/ossl_ssl.c	(revision 29976)
+++ ext/openssl/ossl_ssl.c	(revision 29977)
@@ -147,6 +147,13 @@
     return Data_Wrap_Struct(klass, 0, ossl_sslctx_free, ctx);
 }
 
+/*
+ * call-seq:
+ *    ctx.ssl_version = :TLSv1
+ *    ctx.ssl_version = "SSLv23_client"
+ *
+ * You can get a list of valid methods with OpenSSL::SSL::SSLContext::METHODS
+ */
 static VALUE
 ossl_sslctx_set_ssl_version(VALUE self, VALUE ssl_method)
 {
@@ -714,6 +721,12 @@
  *    ctx.ciphers = "cipher1:cipher2:..."
  *    ctx.ciphers = [name, ...]
  *    ctx.ciphers = [[name, version, bits, alg_bits], ...]
+ *
+ * Sets the list of available ciphers for this context.  Note in a server
+ * context some ciphers require the appropriate certificates.  For example, an
+ * RSA cipher can only be chosen when an RSA certificate is available.
+ *
+ * See also OpenSSL::Cipher and OpenSSL::Cipher::ciphers
  */
 static VALUE
 ossl_sslctx_set_ciphers(VALUE self, VALUE v)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]