summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-06 15:58:12 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-06 15:58:12 +0000
commita120569068621fce972506db53c3cce1cdac8939 (patch)
treec361ed0fd9f6929e5903d7b11b3a3c222a51d3af /string.c
parent69c63f76f46936fb7099fee4e32508b1b9bd24b3 (diff)
* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/string.c b/string.c
index cfd830fc04..acb2a91ee8 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 <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