summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-16 17:40:00 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-16 17:40:00 +0000
commit6ff75042db1a68a23a133667b3a97c9ec23c131e (patch)
tree71b655e989f973dc4f1e2e08a63aeeb776e75956 /vm.c
parentc4fdd64fe03cc5fd99cd6eee10df9b660b46167d (diff)
* compile.c, iseq.c, ruby.c, vm.c, vm_core.h, vm_eval.c: add absolute
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
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index 96a04bfcba..678fcb8762 100644
--- a/vm.c
+++ b/vm.c
@@ -1441,7 +1441,7 @@ rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg,
{
rb_thread_t *th = GET_THREAD();
const rb_control_frame_t *reg_cfp = th->cfp;
- volatile VALUE iseqval = rb_iseq_new(0, filename, filename, 0, ISEQ_TYPE_TOP);
+ volatile VALUE iseqval = rb_iseq_new(0, filename, filename, filename, 0, ISEQ_TYPE_TOP);
VALUE val;
vm_push_frame(th, DATA_PTR(iseqval), VM_FRAME_MAGIC_TOP,
@@ -2052,7 +2052,7 @@ Init_VM(void)
rb_vm_t *vm = ruby_current_vm;
rb_thread_t *th = GET_THREAD();
VALUE filename = rb_str_new2("<main>");
- volatile VALUE iseqval = rb_iseq_new(0, filename, filename, 0, ISEQ_TYPE_TOP);
+ volatile VALUE iseqval = rb_iseq_new(0, filename, filename, Qnil, 0, ISEQ_TYPE_TOP);
volatile VALUE th_self;
rb_iseq_t *iseq;