* tool/compile_prelude.rb: too long string literal causes compile error
on some platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a436212282
commit
bc70ea70cd
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jul 31 15:06:33 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* tool/compile_prelude.rb: too long string literal causes compile error
|
||||||
|
on some platforms.
|
||||||
|
|
||||||
Fri Jul 31 13:15:27 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
Fri Jul 31 13:15:27 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* transcode.c (str_encode_bang): C99ism.
|
* transcode.c (str_encode_bang): C99ism.
|
||||||
|
@ -51,17 +51,22 @@ lines_list = preludes.map {|filename|
|
|||||||
"nil"
|
"nil"
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
line.gsub!(/require\s*(\(?)\s*(["'])(.*?)\2\s*\1/) {
|
if /require\s*(\(?)\s*(["'])(.*?)\2\s*\1/ =~ line
|
||||||
orig, path = $&, $3
|
orig, path = $&, $3
|
||||||
srcdir = File.expand_path("../..", __FILE__)
|
srcdir = File.expand_path("../..", __FILE__)
|
||||||
path = File.expand_path(path, srcdir)
|
path = File.expand_path(path, srcdir)
|
||||||
if File.exist?(path)
|
if File.exist?(path)
|
||||||
"eval(%s, TOPLEVEL_BINDING, %s, %d)" % [ File.read(path).dump, prelude_name(filename, path).dump, 1]
|
lines << c_esc("eval(")
|
||||||
|
File.readlines(path).each do |line|
|
||||||
|
lines << c_esc(line.dump)
|
||||||
|
end
|
||||||
|
lines << c_esc(", TOPLEVEL_BINDING, %s, %d)" % [ prelude_name(filename, path).dump, 1])
|
||||||
else
|
else
|
||||||
orig
|
lines << c_esc(orig)
|
||||||
end
|
end
|
||||||
}
|
else
|
||||||
lines << c_esc(line)
|
lines << c_esc(line)
|
||||||
|
end
|
||||||
}
|
}
|
||||||
setup_lines = []
|
setup_lines = []
|
||||||
if need_ruby_prefix
|
if need_ruby_prefix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user