summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-random
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-06-01 10:36:28 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 16:20:59 +0900
commit2a366ffba8397c6f848d659dce76e03e1bf05d17 (patch)
treeab3d1e81ebf3659e3f5776729c8ebe1b7cbbee86 /mrbgems/mruby-random
parent8864c30d161e627438b86a986c19c048eb31bcb4 (diff)
downloadmruby-2a366ffba8397c6f848d659dce76e03e1bf05d17.tar.gz
mruby-2a366ffba8397c6f848d659dce76e03e1bf05d17.zip
Use functions that take symbols to reduce string litrals in C.
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 c3a3f61b4..c91df35f3 100644
--- a/mrbgems/mruby-random/src/random.c
+++ b/mrbgems/mruby-random/src/random.c
@@ -135,7 +135,7 @@ get_opt(mrb_state* mrb)
static void
random_check(mrb_state *mrb, mrb_value random) {
- struct RClass *c = mrb_class_get(mrb, "Random");
+ struct RClass *c = mrb_class_get_id(mrb, MRB_SYM(Random));
if (!mrb_obj_is_kind_of(mrb, random, c) || !mrb_istruct_p(random)) {
mrb_raise(mrb, E_TYPE_ERROR, "Random instance required");
}