From 9166fdac5041c14c065844bed61410a92b6c06b4 Mon Sep 17 00:00:00 2001 From: stomar Date: Mon, 24 Dec 2018 20:41:15 +0000 Subject: 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 --- complex.c | 4 ++-- object.c | 6 +++--- 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) * String#to_i. Non string values will be converted by first * trying to_int, then to_i. * - * Passing nil raises a TypeError, while passing String that + * Passing nil raises a TypeError, while passing a String that * does not conform with numeric representation raises an ArgumentError. * This behavior can be altered by passing exception: false, - * in this case not convertible value will return nil. + * in this case a not convertible value will return nil. * * 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 arg.to_f. * Converting a string with invalid characters will result in a ArgumentError. * Converting nil generates a TypeError. - * Exceptions could be suppressed by passing exception: false. + * Exceptions can be suppressed by passing exception: false. * * Float(1) #=> 1.0 * Float("123.456") #=> 123.456 -- cgit v1.2.3