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