From 89da54d6885855f12b41943c72d2f55d7f838e8a Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 6 Oct 2009 15:58:12 +0000 Subject: * string.c (rb_str_upto): RDoc updated. a patch from Nobuhiro IMAI in [ruby-dev:39440]. [ruby-dev:39439] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ string.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4f45ac5b7..d42c81a6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ Wed Oct 7 00:27:01 2009 Tanaka Akira bind_random_port. [ruby-core:25970] +Tue Oct 6 23:32:38 2009 Yukihiro Matsumoto + + * string.c (rb_str_upto): RDoc updated. a patch from Nobuhiro + IMAI in [ruby-dev:39440]. [ruby-dev:39439] + Tue Oct 6 21:30:58 2009 Tanaka Akira * io.c (io_reopen): avoid close if possible. diff --git a/string.c b/string.c index cfd830fc0..acb2a91ee 100644 --- a/string.c +++ b/string.c @@ -2863,6 +2863,14 @@ rb_str_succ_bang(VALUE str) * * a8 a9 b0 b1 b2 b3 b4 b5 b6 * a8 a9 b0 b1 b2 b3 b4 b5 b6 + * + * If str and other_str 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 -- cgit