diff options
| author | Yukihiro Matz Matsumoto <[email protected]> | 2012-11-04 04:51:13 +0900 |
|---|---|---|
| committer | Yukihiro Matz Matsumoto <[email protected]> | 2012-11-04 04:51:13 +0900 |
| commit | da88627a37cb1d5ca8d31bb14f3b3d8bb4d7e33e (patch) | |
| tree | 944ec53cab918c00f7970522cc92a292ca750592 /src | |
| parent | 3ba521ae9e238c91198404845e4f213ce541b13d (diff) | |
| download | mruby-da88627a37cb1d5ca8d31bb14f3b3d8bb4d7e33e.tar.gz mruby-da88627a37cb1d5ca8d31bb14f3b3d8bb4d7e33e.zip | |
add mrb_float_p()
Diffstat (limited to 'src')
| -rw-r--r-- | src/numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/numeric.c b/src/numeric.c index e4d9c9ff9..562562340 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -878,7 +878,7 @@ static mrb_value bit_coerce(mrb_state *mrb, mrb_value x) { while (!mrb_fixnum_p(x)) { - if (mrb_type(x) == MRB_TT_FLOAT) { + if (mrb_float_p(x)) { mrb_raise(mrb, E_TYPE_ERROR, "can't convert Float into Integer"); } x = mrb_to_int(mrb, x); |
