aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ext/bigdecimal/bigdecimal.c6
-rw-r--r--string.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 59a0cef155..f4c22b5060 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -439,7 +439,9 @@ BigDecimal_IsNaN(VALUE self)
return Qfalse;
}
-/* Returns True if the value is infinite */
+/* Returns nil, −1, or +1 depending on whether the value is finite,
+ * -infinity, or +infinity.
+ */
static VALUE
BigDecimal_IsInfinite(VALUE self)
{
@@ -755,7 +757,7 @@ BigDecimal_zero(VALUE self)
return VpIsZero(a) ? Qtrue : Qfalse;
}
-/* Returns True if the value is non-zero. */
+/* Returns self if the value is non-zero, nil otherwise. */
static VALUE
BigDecimal_nonzero(VALUE self)
{
diff --git a/string.c b/string.c
index ae1e3154e4..1cd5e7fbe4 100644
--- a/string.c
+++ b/string.c
@@ -5635,11 +5635,11 @@ rb_str_split(VALUE str, const char *sep0)
* into paragraphs delimited by multiple successive newlines.
*
* print "Example one\n"
- * "hello\nworld".each {|s| p s}
+ * "hello\nworld".each_line {|s| p s}
* print "Example two\n"
- * "hello\nworld".each('l') {|s| p s}
+ * "hello\nworld".each_line('l') {|s| p s}
* print "Example three\n"
- * "hello\n\n\nworld".each('') {|s| p s}
+ * "hello\n\n\nworld".each_line('') {|s| p s}
*
* <em>produces:</em>
*