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

ruby-changes:2705

From: ko1@a...
Date: 11 Dec 2007 23:06:05 +0900
Subject: [ruby-changes:2705] matz - Ruby:r14196 (trunk): * pack.c (pack_pack): RDoc update. a patch from Gary Wright

matz	2007-12-11 23:05:34 +0900 (Tue, 11 Dec 2007)

  New Revision: 14196

  Modified files:
    trunk/ChangeLog
    trunk/pack.c

  Log:
    * pack.c (pack_pack): RDoc update.  a patch from Gary Wright
      <radar2002 AT gmail.com>.  [ruby-core:13998]
    
    * pack.c (pack_unpack): ditto.

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14196&r2=14195
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/pack.c?r1=14196&r2=14195

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14195)
+++ ChangeLog	(revision 14196)
@@ -1,3 +1,10 @@
+Tue Dec 11 23:04:17 2007  Yukihiro Matsumoto  <matz@r...>
+
+	* pack.c (pack_pack): RDoc update.  a patch from Gary Wright
+	  <radar2002 AT gmail.com>.  [ruby-core:13998]
+
+	* pack.c (pack_unpack): ditto.
+
 Tue Dec 11 16:37:47 2007  Tanaka Akira  <akr@f...>
 
 	* encoding.c (rb_enc_ascget): renamed from rb_enc_get_ascii.
Index: pack.c
===================================================================
--- pack.c	(revision 14195)
+++ pack.c	(revision 14196)
@@ -395,8 +395,8 @@
  *   Directive    Meaning
  *   ---------------------------------------------------------------
  *       @     |  Moves to absolute position
- *       A     |  ASCII string (space padded, count is width)
- *       a     |  ASCII string (null padded, count is width)
+ *       A     |  arbitrary binary string (space padded, count is width)
+ *       a     |  arbitrary binary string (null padded, count is width)
  *       B     |  Bit string (descending bit order)
  *       b     |  Bit string (ascending bit order)
  *       C     |  Unsigned char
@@ -519,8 +519,8 @@
 
 	    switch (type) {
 	      case 'a':		/* arbitrary binary string (null padded)  */
-	      case 'A':		/* ASCII string (space padded) */
-	      case 'Z':		/* null terminated ASCII string  */
+	      case 'A':         /* arbitrary binary string (ASCII space padded) */
+	      case 'Z':         /* null terminated string  */
 		if (plen >= len) {
 		    rb_str_buf_cat(res, ptr, len);
 		    if (p[-1] == '*' && type == 'Z')
@@ -1176,9 +1176,10 @@
  *
  *     Format | Returns | Function
  *     -------+---------+-----------------------------------------
- *       A    | String  | with trailing nulls and spaces removed
+ *       A    | String  | arbitrary binary string with trailing
+ *            |         | nulls and ASCII spaces removed
  *     -------+---------+-----------------------------------------
- *       a    | String  | string
+ *       a    | String  | arbitrary binary string
  *     -------+---------+-----------------------------------------
  *       B    | String  | extract bits from each character (msb first)
  *     -------+---------+-----------------------------------------

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

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