summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-11 05:24:59 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-11 05:24:59 +0000
commitcc043890f8cb7c0c057fb076b30765973716c470 (patch)
tree7e7a184bde865a5d67350923fbee84a5ea115f1e /file.c
parent076ef717ac48d8093252ed47f9b0591416f339a4 (diff)
* bignum.c (bigdivrem): access boundary bug.
* marshal.c (w_object): prohibit dumping out singleton classes. * object.c (rb_mod_to_s): distinguish singleton classes. * variable.c (rb_class2name): it's ok to reveal NilClass, TrueClass, FalseClass. * eval.c (rb_yield_0): preserve and restore ruby_cref as well. * eval.c (is_defined): core dumped during instance_eval for special constants. * eval.c (rb_eval): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/file.c b/file.c
index c8f27acf08..128b667214 100644
--- a/file.c
+++ b/file.c
@@ -2206,8 +2206,7 @@ rb_find_file(file)
char *file;
{
extern VALUE rb_load_path;
- volatile VALUE vpath;
- VALUE fname;
+ VALUE vpath, fname;
char *path;
struct stat st;
@@ -2215,7 +2214,7 @@ rb_find_file(file)
if (is_macos_native_path(file)) {
FILE *f;
- if (safe_level >= 2 && !rb_path_check(file)) {
+ if (rb_safe_level() >= 2 && !rb_path_check(file)) {
rb_raise(rb_eSecurityError, "loading from unsafe file %s", file);
}
f= fopen(file, "r");