aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--hash.c4
-rw-r--r--object.c4
-rw-r--r--range.c2
-rw-r--r--string.c21
-rw-r--r--struct.c4
6 files changed, 33 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 0e066755b4..52320f7dc1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,19 @@ Wed Jul 1 06:47:09 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* enum.c (enum_grep): gets rid of type-punning calls.
+Tue Jun 30 18:19:07 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * hash.c (rb_hash_hash): documentation fix. a patch from
+ Marc-Andre Lafortune. [ruby-core:23943]
+
+ * object.c (rb_mod_cmp): ditto.
+
+ * range.c (range_eq): ditto.
+
+ * string.c (rb_str_partition, rb_str_rpartition): ditto.
+
+ * struct.c (rb_struct_s_def): ditto.
+
Tue Jun 30 17:44:24 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
* re.c (reg_match_pos): adjust offset based on characters, not
diff --git a/hash.c b/hash.c
index 5d85797c24..6579a1eac2 100644
--- a/hash.c
+++ b/hash.c
@@ -1557,9 +1557,9 @@ recursive_hash(VALUE hash, VALUE dummy, int recur)
/*
* call-seq:
- * array.hash -> fixnum
+ * hsh.hash -> fixnum
*
- * Compute a hash-code for this array. Two arrays with the same content
+ * Compute a hash-code for this hash. Two hashes with the same content
* will have the same hash code (and will compare using <code>eql?</code>).
*/
diff --git a/object.c b/object.c
index 595c401955..2df7239f18 100644
--- a/object.c
+++ b/object.c
@@ -1316,8 +1316,8 @@ rb_mod_gt(VALUE mod, VALUE arg)
*
* Comparison---Returns -1 if <i>mod</i> includes <i>other_mod</i>, 0 if
* <i>mod</i> is the same as <i>other_mod</i>, and +1 if <i>mod</i> is
- * included by <i>other_mod</i> or if <i>mod</i> has no relationship with
- * <i>other_mod</i>. Returns <code>nil</code> if <i>other_mod</i> is
+ * included by <i>other_mod</i>. Returns <code>nil</code> if <i>mod</i>
+ * has no relationship with <i>other_mod</i> or if <i>other_mod</i> is
* not a module.
*/
diff --git a/range.c b/range.c
index 3ffbb750fc..0d25a37d55 100644
--- a/range.c
+++ b/range.c
@@ -112,7 +112,7 @@ range_exclude_end_p(VALUE range)
*
* Returns <code>true</code> only if <i>obj</i> is a Range, has equivalent
* beginning and end items (by comparing them with <code>==</code>), and has
- * the same #exclude_end? setting as <i>rng</t>.
+ * the same <code>exclude_end?</code> setting as <i>rng</i>.
*
* (0..2) == (0..2) #=> true
* (0..2) == Range.new(0,2) #=> true
diff --git a/string.c b/string.c
index c9561208aa..9418bfe2ca 100644
--- a/string.c
+++ b/string.c
@@ -6884,13 +6884,16 @@ rb_str_center(int argc, VALUE *argv, VALUE str)
/*
* call-seq:
* str.partition(sep) => [head, sep, tail]
+ * str.partition(regexp) => [head, match, tail]
*
- * Searches the string for <i>sep</i> and returns the part before
- * it, the <i>sep</i>, and the part after it. If <i>sep</i> is not found,
- * returns <i>str</i> and two empty strings.
+ * Searches <i>sep</i> or pattern (<i>regexp</i>) in the string
+ * and returns the part before it, the match, and the part
+ * after it.
+ * If it is not found, returns two empty strings and <i>str</i>.
*
* "hello".partition("l") #=> ["he", "l", "lo"]
* "hello".partition("x") #=> ["hello", "", ""]
+ * "hello".partition(/.l/) #=> ["h", "el", "lo"]
*/
static VALUE
@@ -6930,15 +6933,17 @@ rb_str_partition(VALUE str, VALUE sep)
/*
* call-seq:
- * str.rpartition(sep) => [head, sep, tail]
+ * str.rpartition(sep) => [head, sep, tail]
+ * str.rpartition(regexp) => [head, match, tail]
*
- * Searches <i>sep</i> in the string from the end of the string, and
- * returns the part before it, the <i>sep</i>, and the part after it.
- * If <i>sep</i> is not found, returns two empty strings and
- * <i>str</i>.
+ * Searches <i>sep</i> or pattern (<i>regexp</i>) in the string from the end
+ * of the string, and returns the part before it, the match, and the part
+ * after it.
+ * If it is not found, returns two empty strings and <i>str</i>.
*
* "hello".rpartition("l") #=> ["hel", "l", "o"]
* "hello".rpartition("x") #=> ["", "", "hello"]
+ * "hello".rpartition(/.l/) #=> ["he", "ll", "o"]
*/
static VALUE
diff --git a/struct.c b/struct.c
index 25e91a2abb..a93ed65f7d 100644
--- a/struct.c
+++ b/struct.c
@@ -303,8 +303,8 @@ rb_struct_define(const char *name, ...)
* which can then be used to create specific instances of the new
* structure. The number of actual parameters must be
* less than or equal to the number of attributes defined for this
- * class; unset parameters default to \nil{}. Passing too many
- * parameters will raise an \E{ArgumentError}.
+ * class; unset parameters default to <code>nil</code>. Passing too many
+ * parameters will raise an <code>ArgumentError</code>.
*
* The remaining methods listed in this section (class and instance)
* are defined for this generated class.