diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | string.c | 6 |
2 files changed, 7 insertions, 4 deletions
@@ -1,3 +1,8 @@ +Tue Jun 27 23:03:49 2006 Yukihiro Matsumoto <matz@ruby-lang.org> + + * string.c: RDoc update for =~ method. a patch from Alex Young + <alex at blackkettle.org>. [ruby-core:08068] + Tue Jun 27 22:47:18 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> * ext/tk/tcltklib.c: forgot to update TCLTKLIB_RELEASE_DATE. @@ -1278,13 +1278,11 @@ rb_str_rindex_m(argc, argv, str) * str =~ obj => fixnum or nil * * Match---If <i>obj</i> is a <code>Regexp</code>, use it as a pattern to match - * against <i>str</i>. If <i>obj</i> is a <code>String</code>, look for it in - * <i>str</i> (similar to <code>String#index</code>). Returns the position the - * match starts, or <code>nil</code> if there is no match. Otherwise, invokes + * against <i>str</i>,and returns the position the match starts, or + * <code>nil</code> if there is no match. Otherwise, invokes * <i>obj.=~</i>, passing <i>str</i> as an argument. The default * <code>=~</code> in <code>Object</code> returns <code>false</code>. * - * "cat o' 9 tails" =~ '\d' #=> nil * "cat o' 9 tails" =~ /\d/ #=> 7 * "cat o' 9 tails" =~ 9 #=> false */ |