diff options
Diffstat (limited to 'rational.c')
-rw-r--r-- | rational.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rational.c b/rational.c index a6a94368e8..f668cc4691 100644 --- a/rational.c +++ b/rational.c @@ -529,8 +529,8 @@ static VALUE nurat_s_convert(int argc, VALUE *argv, VALUE klass); /* * call-seq: - * Rational(x, y) -> rational - * Rational(arg) -> rational + * Rational(x, y, exception: true) -> rational + * Rational(arg, exception: true) -> rational * * Returns +x/y+ or +arg+ as a Rational. * @@ -546,6 +546,8 @@ static VALUE nurat_s_convert(int argc, VALUE *argv, VALUE klass); * Rational(nil) #=> TypeError * Rational(1, nil) #=> TypeError * + * Rational("10 cents", exception: false) #=> nil + * * Syntax of the string form: * * string form = extra spaces , rational , extra spaces ; |