mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
8b9a3eaba6
commit
daa67ca352
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue