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 /load.c | |
parent | 4df965f4ed21353b6e0c89ac8286c64c6266ec04 (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 'load.c')
-rw-r--r-- | load.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -297,7 +297,7 @@ rb_load_internal(VALUE fname, int wrap) th->mild_compile_error++; node = (NODE *)rb_load_file(RSTRING_PTR(fname)); loaded = TRUE; - iseq = rb_iseq_new_top(node, rb_str_new2("<top (required)>"), fname, fname, Qfalse); + iseq = rb_iseq_new_top(node, rb_str_new2("<top (required)>"), fname, rb_realpath_internal(Qnil, fname, 1), Qfalse); th->mild_compile_error--; rb_iseq_eval(iseq); } @@ -596,7 +596,7 @@ rb_require_safe(VALUE fname, int safe) case 's': handle = (long)rb_vm_call_cfunc(rb_vm_top_self(), load_ext, - path, 0, path, path); + path, 0, path); rb_ary_push(ruby_dln_librefs, LONG2NUM(handle)); break; } @@ -643,7 +643,7 @@ ruby_init_ext(const char *name, void (*init)(void)) { if (load_lock(name)) { rb_vm_call_cfunc(rb_vm_top_self(), init_ext_call, (VALUE)init, - 0, rb_str_new2(name), Qnil); + 0, rb_str_new2(name)); rb_provide(name); load_unlock(name, 1); } |