mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ext/exmk.rb.in, lib/singleton.rb: remove nested ""s.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b3ecbfaa01
commit
8a6092725d
3 changed files with 8 additions and 7 deletions
|
@ -412,7 +412,7 @@ def create_makefile(target)
|
||||||
$srcdir = File.join($top_srcdir,"ext",$mdir)
|
$srcdir = File.join($top_srcdir,"ext",$mdir)
|
||||||
mfile = open("Makefile", "w")
|
mfile = open("Makefile", "w")
|
||||||
mfile.binmode if /mingw/ =~ RUBY_PLATFORM
|
mfile.binmode if /mingw/ =~ RUBY_PLATFORM
|
||||||
mfile.printf "\
|
mfile.printf <<EOL, if $static then "" else "@CCDLFLAGS@" end, $defs.join(" ")
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
||||||
#### Start of system configuration section. ####
|
#### Start of system configuration section. ####
|
||||||
|
@ -436,7 +436,7 @@ else
|
||||||
"LDSHARED = @LDSHARED@ #{defflag}\n"
|
"LDSHARED = @LDSHARED@ #{defflag}\n"
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
", if $static then "" else "@CCDLFLAGS@" end, $defs.join(" ")
|
EOL
|
||||||
mfile.puts "LIBPATH = #{libpath}" if libpath
|
mfile.puts "LIBPATH = #{libpath}" if libpath
|
||||||
|
|
||||||
mfile.puts ".SUFFIXES: .@OBJEXT@" unless "@OBJEXT@" == "o"
|
mfile.puts ".SUFFIXES: .@OBJEXT@" unless "@OBJEXT@" == "o"
|
||||||
|
|
|
@ -239,8 +239,8 @@ class Ups < SomeSingletonClass
|
||||||
puts "Before there were #{num_of_instances(self)}"
|
puts "Before there were #{num_of_instances(self)}"
|
||||||
sleep 5
|
sleep 5
|
||||||
puts "Now there is #{num_of_instances(self)}"
|
puts "Now there is #{num_of_instances(self)}"
|
||||||
puts "#{@enter.join "; "} was the order of threads entering the waiting loop"
|
puts "#{@enter.join '; '} was the order of threads entering the waiting loop"
|
||||||
puts "#{@leave.join "; "} was the order of threads leaving the waiting loop"
|
puts "#{@leave.join '; '} was the order of threads leaving the waiting loop"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1209,15 +1209,16 @@ else
|
||||||
dir << "/"
|
dir << "/"
|
||||||
end
|
end
|
||||||
|
|
||||||
def valid_syntax?(code)
|
def valid_syntax?(code, fname)
|
||||||
eval("BEGIN {return true}\n#{code}")
|
eval("BEGIN {return true}\n#{code}", nil, fname)
|
||||||
rescue Exception
|
rescue Exception
|
||||||
|
p $!
|
||||||
ensure
|
ensure
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
for script in Dir["#{dir}{lib,sample,ext}/**/*.rb"]
|
for script in Dir["#{dir}{lib,sample,ext}/**/*.rb"]
|
||||||
unless valid_syntax? IO::read(script)
|
unless valid_syntax? IO::read(script), script
|
||||||
$bad = true
|
$bad = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue