path field into rb_iseq_t. The field contains a string representing
a path to corresponding source file. or nil when the iseq is created
from -e, stdin, eval, etc. This field is used for require_relative.
[ruby-dev:40004]
* load.c (rb_f_require_relative): add C implementation of
require_relative.
* prelude.rb (require_relative): get rid of Ruby implementation of
require_relative.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
paths with tilde twice.
* load.c (rb_f_load): load the given path directly if not found in
load_path.
* load.c (search_required): search file in specified safe level.
* load.c (rb_require_safe): path to load is already searched in
search_required().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
subtraction because feature may be a expanded path.
[ruby-core:21267]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
vm_get_ruby_level_next_cfp(), rb_vm_make_env_object(),
vm_stack_to_heap(), vm_make_proc(), vm_invoke_proc(),
vm_get_sourceline(), vm_cref(), vm_localjump_error(),
vm_make_jump_tag_but_local_jump(), vm_jump_tag_but_local_jump().
This changes may affect only core because most of renamed functions
require a pointer of not-exposed struct such as rb_thread_t or NODE.
In short, they are core functions.
* cont.c, eval.c, eval_intern.h, load.c, proc.c, thread.c,
vm_core.h, vm_dump.c, vm_eval.c, vm_exec.c, vm_insnhelper.c:
ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
touching.
* load.c (rb_feature_provided): new function to return the loading
path in addition to rb_provided().
* load.c (search_required): sets path if loading.
* variable.c (autoload_provided): load paths are expanded to check
if loading.
* variable.c (autoload_node): keeps autoload mark while loading.
[ruby-core:20235]
* variable.c (rb_const_get_0): loops while autoload mark is set.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
loaded, to get rid of loading same library again. [ruby-core:19798]
* thread.c (rb_barrier_wait): can not wait destroyed barrier.
* thread.c (rb_barrier_destroy): destroys barrier so that no longer
waited.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
for casual use. Usage: (1) assign {} to COVERAGE__, (2) require or
load Ruby source file, and (3) COVERAGE__["sourcefilepath"] will
return an array whose elements represent number of executions per
line of source code.
* vm_core.h: add field of coverage array to iseq.
* iseq.c (prepare_iseq_build): ditto.
* insns.def (trace): update coverage array.
* parse.y (coverage): create and initialize coverage array.
* compile.h (ADD_TRACE): add trace instruction to update covearge
array.
* thread.c (clear_coverage): delete coverage array when forking.
Otherwise, double count of coverage may occur.
* lib/coverage.rb: sample coverage measurement tool.
* error.c: distinguish explicitly between parse_in_eval and
mild_compile_error.
* load.c: ditto.
* vm_eval.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
features, loading or loaded features are already expanded in 1.9.
* variable.c (rb_autoload_load): no needs to check if provided before
rb_require_safe. [ruby-dev:34266]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
lex.c.blt, keywords, load.c, thread.c: more ANSI'ize.
a patch from Tadashi Saito <shiba AT mail2.accsnet.ne.jp>
in [ruby-dev:32725]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* load.c (search_required): returns path too if feature is being
loaded. [ruby-dev:32048] [TODO: refactoring]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e