summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-random
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-09-27 00:00:03 +0900
committerGitHub <[email protected]>2019-09-27 00:00:03 +0900
commit5cd6ed4511a0d8d5a19a0cd2beb4cdd97dc3eff5 (patch)
treeaed35130caaefda715f3db749a506f0bb0787090 /mrbgems/mruby-random
parentd4be545d54ad53e282637f66ef5b770b9effa918 (diff)
parentfeaf80d8996340bd0316fda72418b1abd774bd59 (diff)
downloadmruby-5cd6ed4511a0d8d5a19a0cd2beb4cdd97dc3eff5.tar.gz
mruby-5cd6ed4511a0d8d5a19a0cd2beb4cdd97dc3eff5.zip
Merge pull request #4733 from shuujii/use-type-predicate-macros-instead-of-mrb_type-if-possible
Use type predicate macros instead of `mrb_type` if possible
Diffstat (limited to 'mrbgems/mruby-random')
-rw-r--r--mrbgems/mruby-random/src/random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-random/src/random.c b/mrbgems/mruby-random/src/random.c
index af9876ce7..515c0707a 100644
--- a/mrbgems/mruby-random/src/random.c
+++ b/mrbgems/mruby-random/src/random.c
@@ -136,7 +136,7 @@ get_opt(mrb_state* mrb)
static void
random_check(mrb_state *mrb, mrb_value random) {
struct RClass *c = mrb_class_get(mrb, "Random");
- if (!mrb_obj_is_kind_of(mrb, random, c) || mrb_type(random) != MRB_TT_ISTRUCT) {
+ if (!mrb_obj_is_kind_of(mrb, random, c) || !mrb_istruct_p(random)) {
mrb_raise(mrb, E_TYPE_ERROR, "Random instance required");
}
}