summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-07 11:19:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-07 11:19:37 +0000
commiteffd8230ea7f34fac60cca80d4a50c7975bd9f22 (patch)
treef61b7e2710f6e94657630069b9a4c7232eea0141 /ruby.c
parent6dc931e59f7f0099909a077dfbd6be5e4326ae09 (diff)
* gc.c (rb_source_filename): added. holds unique strings for file
names with GC space. * gc.c (rb_gc_mark): mark source file name. * gc.c (gc_sweep): ditto. * gc.c (Init_GC): initialize source file name table. * intern.h (rb_source_filename): added. * eval.c (rb_eval_string): use rb_source_filename(). * parse.y (yycompile): ditto. * ruby.c (proc_options): ditto. * ruby.c (load_file): ditto. * ruby.c (ruby_script): ditto. * ruby.c (ruby_prog_init): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ruby.c b/ruby.c
index bd7d599..155a6fa 100644
--- a/ruby.c
+++ b/ruby.c
@@ -717,7 +717,7 @@ proc_options(argc, argv)
process_sflag();
ruby_init_loadpath();
- ruby_sourcefile = argv0;
+ ruby_sourcefile = rb_source_filename(argv0);
if (e_script) {
require_libraries();
rb_compile_string(script, e_script, 1);
@@ -825,7 +825,7 @@ load_file(fname, script)
argv[0] = path;
execv(path, argv);
- ruby_sourcefile = fname;
+ ruby_sourcefile = rb_source_filename(fname);
ruby_sourceline = 1;
rb_fatal("Can't exec %s", path);
}
@@ -951,7 +951,7 @@ ruby_script(name)
{
if (name) {
rb_progname = rb_tainted_str_new2(name);
- ruby_sourcefile = name;
+ ruby_sourcefile = rb_source_filename(name);
}
}
@@ -990,7 +990,7 @@ ruby_prog_init()
{
init_ids();
- ruby_sourcefile = "ruby";
+ ruby_sourcefile = rb_source_filename("ruby");
rb_define_variable("$VERBOSE", &ruby_verbose);
rb_define_variable("$-v", &ruby_verbose);
rb_define_variable("$-w", &ruby_verbose);