summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-22 22:39:31 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-22 22:39:31 +0000
commit9b9fe826fd1ce825af3503f39643f75910307a51 (patch)
treef7f17130a3822841cd606414985614fd1c833772 /rational.c
parentc7dafeb20c125f2a647f35e61fa68be9ddb9028d (diff)
{complex,object,rational}.c: document exception: false
From: Victor Shepelev <zverok.offline@gmail.com> [ruby-core:90673] [Bug #15452] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/rational.c b/rational.c
index a6a9436..f668cc4 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 ;