diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-14 04:02:45 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-14 04:02:45 +0000 |
commit | 608ad21517e29cacdbf2a0932489ecb2313a867e (patch) | |
tree | 9b839913b42997fc210f720b2c4a26feacc6389a /rational.c | |
parent | ce48ef2ba70c42da2d3d995093a3526ce54b9447 (diff) |
rational.c: cast to int
* rational.c (f_kind_of_p): rb_obj_is_kind_of returns Qtrue or
Qfalse always, and is safe to cast down to int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r-- | rational.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/rational.c b/rational.c index f8adafe1e0..1467876724 100644 --- a/rational.c +++ b/rational.c @@ -212,8 +212,7 @@ f_minus_one_p(VALUE x) inline static int f_kind_of_p(VALUE x, VALUE c) { - VALUE ret = rb_obj_is_kind_of(x, c); - return RTEST(ret); + return (int)rb_obj_is_kind_of(x, c); } inline static int |