summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-24 20:41:15 +0000
committerstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-24 20:41:15 +0000
commit9166fdac5041c14c065844bed61410a92b6c06b4 (patch)
treec7e8e0948c7cc8ff909cf0b339434651217f13a2
parent1cc8ff001da217d0e98d13fe61fbc9f5547ef722 (diff)
complex.c, object.c: [DOC] improve "exception: false" docs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--complex.c4
-rw-r--r--object.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/complex.c b/complex.c
index eb2a76737b..64065b68cc 100644
--- a/complex.c
+++ b/complex.c
@@ -403,8 +403,8 @@ static VALUE nucomp_s_convert(int argc, VALUE *argv, VALUE klass);
* Complex(nil) #=> TypeError
* Complex(1, nil) #=> TypeError
*
- * Complex(1, nil, exception: false) # => nil
- * Complex('1+2', exception: false) # => nil
+ * Complex(1, nil, exception: false) #=> nil
+ * Complex('1+2', exception: false) #=> nil
*
* Syntax of string form:
*
diff --git a/object.c b/object.c
index 4778118391..a60626b5a1 100644
--- a/object.c
+++ b/object.c
@@ -3234,10 +3234,10 @@ opts_exception_p(VALUE opts)
* <code>String#to_i</code>. Non string values will be converted by first
* trying <code>to_int</code>, then <code>to_i</code>.
*
- * Passing <code>nil</code> raises a TypeError, while passing String that
+ * Passing <code>nil</code> raises a TypeError, while passing a String that
* does not conform with numeric representation raises an ArgumentError.
* This behavior can be altered by passing <code>exception: false</code>,
- * in this case not convertible value will return <code>nil</code>.
+ * in this case a not convertible value will return <code>nil</code>.
*
* Integer(123.999) #=> 123
* Integer("0x1a") #=> 26
@@ -3589,7 +3589,7 @@ rb_Float(VALUE val)
* directly, and with exception to string and nil the rest are converted using <i>arg</i>.to_f.
* Converting a <code>string</code> with invalid characters will result in a <code>ArgumentError</code>.
* Converting <code>nil</code> generates a <code>TypeError</code>.
- * Exceptions could be suppressed by passing <code>exception: false</code>.
+ * Exceptions can be suppressed by passing <code>exception: false</code>.
*
* Float(1) #=> 1.0
* Float("123.456") #=> 123.456