diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-24 14:56:36 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-24 14:56:36 +0000 |
commit | daa67ca352eea47a60c83fa8407a79a36824cf45 (patch) | |
tree | bee932de215ed8592485bddf1dc47371db988b90 | |
parent | 8b9a3eaba6c6af525974f7f41025d3371918931d (diff) | |
download | ruby-daa67ca352eea47a60c83fa8407a79a36824cf45.tar.gz |
rational.c: simplify a branch condition
* rational.c (nurat_s_convert): simplify a branch condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | rational.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rational.c b/rational.c index 010988f7e5..d0a76600ca 100644 --- a/rational.c +++ b/rational.c @@ -2620,7 +2620,7 @@ nurat_s_convert(int argc, VALUE *argv, VALUE klass) } if (argc == 1) { - if (!(k_numeric_p(a1) && k_integer_p(a1))) + if (!k_integer_p(a1)) return rb_convert_type_with_id(a1, T_RATIONAL, "Rational", idTo_r); } else { |