From 942677de5630b5d3121ac02372f2aaa1e82ca02b Mon Sep 17 00:00:00 2001 From: ko1 Date: Sun, 1 Jul 2007 23:57:04 +0000 Subject: * eval_intern.h, yarvcore.h: move declaration of sysstack_error to yarvcore.h. * iseq.c: fix symbol name (:toplevel -> :top). * lib/vm/instruction.rb, template/vm.inc.tmpl: replacable current file name. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- template/vm.inc.tmpl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'template') diff --git a/template/vm.inc.tmpl b/template/vm.inc.tmpl index 8b49beb11..f79de9785 100644 --- a/template/vm.inc.tmpl +++ b/template/vm.inc.tmpl @@ -12,17 +12,17 @@ */ <%= -ret = '' -offset = 15 -line_no = 0 -vm_body.each_line{|line| - if line =~ /^\#line __CURRENT_LINE__/ - ret << line.sub(/__CURRENT_LINE__/, "#{line_no+offset}") +line = 15 +vm_body.gsub(/\n|__CURRENT_LINE__|__CURRENT_FILE__/){|e| + case e + when '__CURRENT_LINE__' + line.to_s + when '__CURRENT_FILE__' + "vm.inc" else - ret < -- cgit