Skip to content

Commit

Permalink
mrb: support require in plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Feb 5, 2015
1 parent fe3e1c1 commit 2fd6563
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ctx_impl_mrb.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,13 @@ grn_ctx_impl_mrb_init_bindings(grn_ctx *ctx)

{
mrb_value load_path;
const char *plugins_dir;
const char *system_ruby_scripts_dir;

load_path = mrb_ary_new(mrb);
plugins_dir = grn_plugin_get_system_plugins_dir();
mrb_ary_push(mrb, load_path,
mrb_str_new_cstr(mrb, plugins_dir));
system_ruby_scripts_dir = grn_mrb_get_system_ruby_scripts_dir(ctx);
mrb_ary_push(mrb, load_path,
mrb_str_new_cstr(mrb, system_ruby_scripts_dir));
Expand Down

0 comments on commit 2fd6563

Please sign in to comment.