summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-17 14:32:20 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-17 14:32:20 +0000
commit2db572514cd9f5cc8957ab8f35f39650bb243ea7 (patch)
treedfff28edbb7592de8dbd64d75e34743ec31ad2e0 /ruby.c
parent4df965f4ed21353b6e0c89ac8286c64c6266ec04 (diff)
* load.c (rb_load_internal): remove call to rb_realpath_internal
within rb_load_internal which caused big performance degradation. Instead, call rb_realpath_internal in the caller of rb_load_internal. [ruby-dev:41502] [ruby-dev:41610] * vm.c (rb_vm_call_cfunc): ditto. * eval_intern.h (rb_vm_call_cfunc): ditto. * ruby.c (process_options): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index daaf0d6923..75ea88fac8 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1462,7 +1462,8 @@ process_options(int argc, char **argv, struct cmdline_options *opt)
PREPARE_PARSE_MAIN({
VALUE path = Qnil;
- if (!opt->e_script && strcmp(opt->script, "-")) path = opt->script_name;
+ if (!opt->e_script && strcmp(opt->script, "-"))
+ path = rb_realpath_internal(Qnil, opt->script_name, 1);
iseq = rb_iseq_new_main(tree, opt->script_name, path);
});