From fc0c2d1cc2f4ec1fb15c73e91cc8aa8d19854c8a Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 29 Nov 2015 02:25:12 +0000 Subject: version.c: remove ruby_engine_name * ruby.c (load_file_internal, ruby_process_options): share ruby_engine instead of literal strings. * version.c (Init_version): remove internal `ruby_engine_name`, but set the VM program name in addition to the global constant. * vm_backtrace.c (location_to_str, oldbt_init): use th eVM program name always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_backtrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm_backtrace.c') diff --git a/vm_backtrace.c b/vm_backtrace.c index 077ed5049f..4267b0dd71 100644 --- a/vm_backtrace.c +++ b/vm_backtrace.c @@ -333,7 +333,7 @@ location_to_str(rb_backtrace_location_t *loc) } else { rb_thread_t *th = GET_THREAD(); - file = th->vm->progname ? th->vm->progname : ruby_engine_name; + file = th->vm->progname; lineno = INT2FIX(0); } name = rb_id2str(loc->body.cfunc.mid); @@ -683,7 +683,7 @@ oldbt_init(void *ptr, size_t dmy) struct oldbt_arg *arg = (struct oldbt_arg *)ptr; rb_thread_t *th = GET_THREAD(); - arg->filename = th->vm->progname ? th->vm->progname : ruby_engine_name;; + arg->filename = th->vm->progname; arg->lineno = 0; } -- cgit v1.2.3