summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-12 18:32:19 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-12 18:32:19 +0000
commit965ff82341d59088a6d417939fd48d6cba465149 (patch)
treeda89f6e2fc231fdbf863e65544df5c931643ead9 /iseq.c
parent207ad0a285c1adabef466a5012c94ada47c53ab1 (diff)
* iseq.c (iseq_s_compile_file): use rb_file_open_str.
* io.c (rb_file_open_generic): call validate_enc_binmode. (rb_file_open_str): call FilePathValue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index 34d9087..057516d 100644
--- a/iseq.c
+++ b/iseq.c
@@ -500,9 +500,10 @@ iseq_s_compile_file(int argc, VALUE *argv, VALUE self)
rb_secure(1);
rb_scan_args(argc, argv, "11", &file, &opt);
+ FilePathValue(file);
fname = StringValueCStr(file);
- f = rb_file_open(fname, "r");
+ f = rb_file_open_str(file, "r");
parser = rb_parser_new();
node = rb_parser_compile_file(parser, fname, f, NUM2INT(line));