From 9b9fe826fd1ce825af3503f39643f75910307a51 Mon Sep 17 00:00:00 2001 From: normal Date: Sat, 22 Dec 2018 22:39:31 +0000 Subject: {complex,object,rational}.c: document exception: false From: Victor Shepelev [ruby-core:90673] [Bug #15452] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- complex.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'complex.c') diff --git a/complex.c b/complex.c index 35e56283ef..eb2a76737b 100644 --- a/complex.c +++ b/complex.c @@ -394,7 +394,7 @@ static VALUE nucomp_s_convert(int argc, VALUE *argv, VALUE klass); /* * call-seq: - * Complex(x[, y]) -> numeric + * Complex(x[, y], exception: false) -> numeric * * Returns x+i*y; * @@ -403,6 +403,9 @@ 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 + * * Syntax of string form: * * string form = extra spaces , complex , extra spaces ; -- cgit v1.2.3