diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-17 14:32:20 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-17 14:32:20 +0000 |
commit | 2db572514cd9f5cc8957ab8f35f39650bb243ea7 (patch) | |
tree | dfff28edbb7592de8dbd64d75e34743ec31ad2e0 /ruby.c | |
parent | 4df965f4ed21353b6e0c89ac8286c64c6266ec04 (diff) | |
download | ruby-2db572514cd9f5cc8957ab8f35f39650bb243ea7.tar.gz |
* 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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); }); |