Exemplo n.º 1
0
static mrb_value 
mrb_random_g_rand(mrb_state *mrb, mrb_value self)
{
  mrb_value random = mrb_const_get(mrb,
          mrb_obj_value(mrb_class_get(mrb, "Random")),
          mrb_intern_lit(mrb, "DEFAULT"));
  return mrb_random_rand(mrb, random);
}
Exemplo n.º 2
0
Arquivo: random.c Projeto: ASnow/mruby
static mrb_value
mrb_random_g_rand(mrb_state *mrb, mrb_value self)
{
  mrb_value random = get_random(mrb);
  return mrb_random_rand(mrb, random);
}