* string.c (rb_str_partition): RDoc update. a patch from

Mauricio Fernandez <mfp at acm.org>.  [ruby-core:09160]

* hash.c (rb_hash_compare_by_id): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2006-10-12 16:07:21 +00:00
Родитель e478cd7c11
Коммит 7df8b0501a
3 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Fri Oct 13 01:05:58 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c (rb_str_partition): RDoc update. a patch from
Mauricio Fernandez <mfp at acm.org>. [ruby-core:09160]
* hash.c (rb_hash_compare_by_id): ditto.
Fri Oct 13 00:34:26 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* object.c (rb_mod_cvar_defined): wrong id check. a patch from

2
hash.c
Просмотреть файл

@ -1555,7 +1555,7 @@ static struct st_hash_type identhash = {
* will consider exact same objects as same keys.
*
* h1 = { "a" => 100, "b" => 200, :c => "c" }
* h1["a"] #=> "a"
* h1["a"] #=> 100
* h1.compare_by_identity
* h1.compare_by_identity? #=> true
* h1["a"] #=> nil # different objects.

Просмотреть файл

@ -4414,13 +4414,10 @@ rb_str_center(int argc, VALUE *argv, VALUE str)
/*
* call-seq:
* str.partition {| obj | block } => [true_array, false_array]
* str.partition(sep) => [head, sep, tail]
*
* If a block is given, returns two arrays of true elements and false
* elements classified by the block evaluation. Otherwise, searches
* <i>sep</i> in the string and returns the part before it, the
* <i>sep</i>, and the part after it. If <i>sep</i> is not found,
* 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.
*
* "hello".partition("l") #=> ["he", "l", "lo"]