diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-01 23:57:04 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-01 23:57:04 +0000 |
commit | 942677de5630b5d3121ac02372f2aaa1e82ca02b (patch) | |
tree | afc7a1724250a16887613cd510519d5600cebad0 /template/vm.inc.tmpl | |
parent | 1ee162123da7944412b12a9aec1a1cde3fbe2938 (diff) | |
download | ruby-942677de5630b5d3121ac02372f2aaa1e82ca02b.tar.gz ruby-942677de5630b5d3121ac02372f2aaa1e82ca02b.tar.xz ruby-942677de5630b5d3121ac02372f2aaa1e82ca02b.zip |
* 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
Diffstat (limited to 'template/vm.inc.tmpl')
-rw-r--r-- | template/vm.inc.tmpl | 18 |
1 files changed, 9 insertions, 9 deletions
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 <<line + line += 1 + e end - line_no += 1 } -ret %> |