summaryrefslogtreecommitdiffstats
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
commit23b4c93c981bc3dc5b8a5aeaa3d871761db8bfba (patch)
treee36ec100def7b6bda26014faa1bc29ed073a3882
parent07116ed20561d8d1b880d2c24d9db9b1b02c896a (diff)
downloadruby-23b4c93c981bc3dc5b8a5aeaa3d871761db8bfba.tar.gz
ruby-23b4c93c981bc3dc5b8a5aeaa3d871761db8bfba.tar.xz
ruby-23b4c93c981bc3dc5b8a5aeaa3d871761db8bfba.zip
rdoc update.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--enum.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/enum.c b/enum.c
index fa2b5926e..523e9bfe0 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