summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-11 06:26:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-11 06:26:19 +0000
commitf2184b2024ffae23462e8e0fec009f4cd9c95c00 (patch)
tree2851c1e3de6cdfdf28617f1b0c2a3df585d136e6 /eval.c
parent528c61b5b7b0ff3a40a004d3fba6582791250a0f (diff)
* hash.c (ruby_setenv): readline library leaves their environment
strings uncopied. "free" check revised. * st.c (numhash): should shuffle bits by dividing by prime number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/eval.c b/eval.c
index 6756111f1c..ad0de6a38d 100644
--- a/eval.c
+++ b/eval.c
@@ -5400,17 +5400,22 @@ rb_f_require(obj, fname)
load_dyna:
rb_provide(feature);
+ {
+ int old_vmode = scope_vmode;
- PUSH_TAG(PROT_NONE);
- if ((state = EXEC_TAG()) == 0) {
- void *handle;
+ PUSH_TAG(PROT_NONE);
+ if ((state = EXEC_TAG()) == 0) {
+ void *handle;
- load = rb_str_new2(file);
- file = RSTRING(load)->ptr;
- handle = dln_load(file);
- rb_ary_push(ruby_dln_librefs, INT2NUM((long)handle));
+ SCOPE_SET(SCOPE_PUBLIC);
+ load = rb_str_new2(file);
+ file = RSTRING(load)->ptr;
+ handle = dln_load(file);
+ rb_ary_push(ruby_dln_librefs, INT2NUM((long)handle));
+ }
+ POP_TAG();
+ SCOPE_SET(old_vmode);
}
- POP_TAG();
if (state) JUMP_TAG(state);
return Qtrue;