summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-11 07:39:17 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-11 07:39:17 +0000
commit3e54f0ee1ff1081a0576a141d27616d29b527393 (patch)
treee36ec100def7b6bda26014faa1bc29ed073a3882 /enum.c
parentbffae00241c5a2a56a4c6e6186c1652418f47378 (diff)
rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/enum.c b/enum.c
index fa2b5926e7..523e9bfe05 100644
--- a/enum.c
+++ b/enum.c
@@ -2240,13 +2240,14 @@ slicebefore_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv)
* The duplicated object is passed to 2nd argument of the block for
* +slice_before+ method.
*
- * # word wrapping
- * def wordwrap(words, width)
+ * # word wrapping.
+ * # this assumes all characters have same width.
+ * def wordwrap(words, maxwidth)
* # if cols is a local variable, 2nd "each" may start with non-zero cols.
* words.slice_before(cols: 0) {|w, h|
* h[:cols] += 1 if h[:cols] != 0
* h[:cols] += w.length
- * if width < h[:cols]
+ * if maxwidth < h[:cols]
* h[:cols] = w.length
* true
* else