summaryrefslogtreecommitdiff
path: root/tool/compile_prelude.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/compile_prelude.rb')
-rw-r--r--tool/compile_prelude.rb18
1 files changed, 1 insertions, 17 deletions
diff --git a/tool/compile_prelude.rb b/tool/compile_prelude.rb
index e792b77406..6a8d9e1695 100644
--- a/tool/compile_prelude.rb
+++ b/tool/compile_prelude.rb
@@ -54,23 +54,7 @@ lines_list = preludes.map {|filename|
[setup_lines, lines]
}
-def serb(str, var)
- result = ''
- str.each_line {|line|
- if /\A!/ =~ line
- result << $'
- else
- line.split(/(<%.*?%>)/).each {|x|
- if /\A<%(.*)%>\z/ =~ x
- result << "#{var} << (#{$1}).to_s\n"
- else
- result << "#{var} << #{x.dump}\n"
- end
- }
- end
- }
- result
-end
+require 'tool/serb'
tmp = ''
eval(serb(<<'EOS', 'tmp'))