ruby-changes:13474
From: matz <ko1@a...>
Date: Wed, 7 Oct 2009 00:58:27 +0900 (JST)
Subject: [ruby-changes:13474] Ruby:r25249 (trunk): * string.c (rb_str_upto): RDoc updated. a patch from Nobuhiro
matz 2009-10-07 00:58:12 +0900 (Wed, 07 Oct 2009) New Revision: 25249 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25249 Log: * string.c (rb_str_upto): RDoc updated. a patch from Nobuhiro IMAI <nov at yo.rim.or.jp> in [ruby-dev:39440]. [ruby-dev:39439] Modified files: trunk/ChangeLog trunk/string.c Index: ChangeLog =================================================================== --- ChangeLog (revision 25248) +++ ChangeLog (revision 25249) @@ -5,6 +5,11 @@ bind_random_port. [ruby-core:25970] +Tue Oct 6 23:32:38 2009 Yukihiro Matsumoto <matz@r...> + + * string.c (rb_str_upto): RDoc updated. a patch from Nobuhiro + IMAI <nov at yo.rim.or.jp> in [ruby-dev:39440]. [ruby-dev:39439] + Tue Oct 6 21:30:58 2009 Tanaka Akira <akr@f...> * io.c (io_reopen): avoid close if possible. Index: string.c =================================================================== --- string.c (revision 25248) +++ string.c (revision 25249) @@ -2863,6 +2863,14 @@ * * a8 a9 b0 b1 b2 b3 b4 b5 b6 * a8 a9 b0 b1 b2 b3 b4 b5 b6 + * + * If <i>str</i> and <i>other_str</i> contains only ascii numeric characters, + * both are recognized as decimal numbers. In addition, the width of + * string (e.g. leading zeros) is handled appropriately. + * + * "9".upto("11").to_a => ["9", "10", "11"] + * "25".upto("5").to_a => [] + * "07".upto("11").to_a => ["07", "08", "09", "10", "11"] */ static VALUE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/