aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/eval.c b/eval.c
index 66347120c1..7bc11350c1 100644
--- a/eval.c
+++ b/eval.c
@@ -7068,15 +7068,15 @@ rb_require_safe(VALUE fname, int safe)
}
else {
ruby_safe_level = 0;
+ /* loading ruby library should be serialized. */
+ if (!loading_tbl) {
+ loading_tbl = st_init_strtable();
+ }
+ /* partial state */
+ ftptr = ruby_strdup(RSTRING_PTR(path));
+ st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
switch (found) {
case 'r':
- /* loading ruby library should be serialized. */
- if (!loading_tbl) {
- loading_tbl = st_init_strtable();
- }
- /* partial state */
- ftptr = ruby_strdup(RSTRING_PTR(path));
- st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
rb_load(path, 0);
break;