mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/mkmf.rb (create_tmpsrc): get rid of side effects.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8a0d53ac2b
commit
b6807f8356
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Oct 23 01:24:49 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (create_tmpsrc): get rid of side effects.
|
||||
|
||||
Thu Oct 23 00:10:01 2008 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* cont.c: separate data structure between rb_fiber_t and
|
||||
|
|
|
@ -323,9 +323,11 @@ EOM
|
|||
end
|
||||
|
||||
def create_tmpsrc(src)
|
||||
src = "#{COMMON_HEADERS}\n#{src}"
|
||||
src = yield(src) if block_given?
|
||||
src[0, 0] = COMMON_HEADERS + "\n"
|
||||
src = src.gsub(/[ \t]+$/, '').gsub(/\A\n+|^\n+$/, '').sub(/[^\n]\z/, "\\&\n")
|
||||
src.gsub!(/[ \t]+$/, '')
|
||||
src.gsub!(/\A\n+|^\n+$/, '')
|
||||
src.sub!(/[^\n]\z/, "\\&\n")
|
||||
count = 0
|
||||
begin
|
||||
open(CONFTEST_C, "wb") do |cfile|
|
||||
|
|
Loading…
Reference in a new issue