зеркало из https://github.com/github/ruby.git
tool: removed unused variables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2b7bde7eff
Коммит
36bc8c0b28
|
@ -93,7 +93,7 @@ def generate_from_ucs(params, pairs)
|
|||
end
|
||||
|
||||
def make_pairs(code_map)
|
||||
pairs = code_map.inject([]) {|acc, (range, ch)|
|
||||
code_map.inject([]) {|acc, (range, ch)|
|
||||
acc += range.map{|uni| pair = [uni, Integer(ch)]; ch = ch.succ; next pair }
|
||||
}
|
||||
end
|
||||
|
|
|
@ -229,7 +229,6 @@ def parse_GraphemeBreakProperty(data)
|
|||
end
|
||||
|
||||
def parse_block(data)
|
||||
current = nil
|
||||
cps = []
|
||||
blocks = []
|
||||
data_foreach('Blocks.txt') do |line|
|
||||
|
|
|
@ -107,7 +107,6 @@ def calc_each data
|
|||
end
|
||||
|
||||
def calc_stat stats
|
||||
stat = []
|
||||
stats[0].each_with_index{|e, idx|
|
||||
bm = e[0]
|
||||
vals = stats.map{|st|
|
||||
|
@ -134,8 +133,7 @@ def stat
|
|||
}
|
||||
# pp total
|
||||
total[0].each_with_index{|e, idx|
|
||||
bm = e[0]
|
||||
# print "#{bm}\t"
|
||||
# print "#{e[0]}\t"
|
||||
total.each{|st|
|
||||
print st[idx][1], "\t"
|
||||
}
|
||||
|
|
|
@ -15,8 +15,6 @@ while /\A(\w+)=(.*)/ =~ ARGV[0]
|
|||
ARGV.shift
|
||||
end
|
||||
|
||||
re = /@(#{config.keys.map {|k| Regexp.quote(k)}.join('|')})@/
|
||||
|
||||
if $output
|
||||
output = open($output, "wb", $mode &&= $mode.oct)
|
||||
output.chmod($mode) if $mode
|
||||
|
|
|
@ -14,7 +14,6 @@ $:.unshift(builddir)
|
|||
posthook = proc do
|
||||
config = RbConfig::CONFIG
|
||||
mkconfig = RbConfig::MAKEFILE_CONFIG
|
||||
extout = File.expand_path(mkconfig["EXTOUT"], builddir)
|
||||
[
|
||||
["top_srcdir", $top_srcdir],
|
||||
["topdir", $topdir],
|
||||
|
|
|
@ -31,7 +31,7 @@ text.gsub!(/^\};/, "")
|
|||
# probename()
|
||||
text.gsub!(/probe (.+)\( *\);/) {
|
||||
probe_name = $1
|
||||
probe = <<-End
|
||||
<<-End
|
||||
probe #{probe_name} = process("ruby").provider("ruby").mark("#{probe_name}")
|
||||
{
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ text.gsub!(/ *probe (.+)\(([^,)]+)\);/) {
|
|||
probe_name = $1
|
||||
arg1 = $2
|
||||
|
||||
probe = <<-End
|
||||
<<-End
|
||||
probe #{probe_name} = process("ruby").provider("ruby").mark("#{probe_name}")
|
||||
{
|
||||
#{set_argument(arg1, 1)}
|
||||
|
@ -57,7 +57,7 @@ text.gsub!(/ *probe (.+)\(([^,)]+),([^,)]+)\);/) {
|
|||
arg1 = $2
|
||||
arg2 = $3
|
||||
|
||||
probe = <<-End
|
||||
<<-End
|
||||
probe #{probe_name} = process("#{ruby_path}").provider("ruby").mark("#{probe_name}")
|
||||
{
|
||||
#{set_argument(arg1, 1)}
|
||||
|
@ -73,7 +73,7 @@ text.gsub!(/ *probe (.+)\(([^,)]+),([^,)]+),([^,)]+)\);/) {
|
|||
arg2 = $3
|
||||
arg3 = $4
|
||||
|
||||
probe = <<-End
|
||||
<<-End
|
||||
probe #{probe_name} = process("#{ruby_path}").provider("ruby").mark("#{probe_name}")
|
||||
{
|
||||
#{set_argument(arg1, 1)}
|
||||
|
@ -91,7 +91,7 @@ text.gsub!(/ *probe (.+)\(([^,)]+),([^,)]+),([^,)]+),([^,)]+)\);/) {
|
|||
arg3 = $4
|
||||
arg4 = $5
|
||||
|
||||
probe = <<-End
|
||||
<<-End
|
||||
probe #{probe_name} = process("#{ruby_path}").provider("ruby").mark("#{probe_name}")
|
||||
{
|
||||
#{set_argument(arg1, 1)}
|
||||
|
@ -103,4 +103,3 @@ text.gsub!(/ *probe (.+)\(([^,)]+),([^,)]+),([^,)]+),([^,)]+)\);/) {
|
|||
}
|
||||
|
||||
print text
|
||||
|
||||
|
|
|
@ -95,7 +95,6 @@ config.each_value {|s| RbConfig.expand(s, config)}
|
|||
srcdir = config["srcdir"] ||= File.dirname(__FILE__)
|
||||
top_srcdir = config["top_srcdir"] ||= File.dirname(srcdir)
|
||||
extout = ARGV[0] || config["EXTOUT"]
|
||||
version = config["ruby_version"]
|
||||
arch = config["arch"]
|
||||
bindir = config["bindir"]
|
||||
libdirname = config["libdirname"]
|
||||
|
@ -104,7 +103,6 @@ vendordir = config["vendordir"]
|
|||
rubylibdir = config["rubylibdir"]
|
||||
rubyarchdir = config["rubyarchdir"]
|
||||
archdir = "#{extout}/#{arch}"
|
||||
rubylibs = [vendordir, rubylibdir, rubyarchdir]
|
||||
[bindir, libdir, archdir].uniq.each do |dir|
|
||||
File.directory?(dir) or mkdir_p(dir)
|
||||
end
|
||||
|
|
|
@ -333,7 +333,6 @@ vendorlibdir = CONFIG["vendorlibdir"]
|
|||
vendorarchlibdir = CONFIG["vendorarchdir"]
|
||||
mandir = CONFIG["mandir", true]
|
||||
docdir = CONFIG["docdir", true]
|
||||
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
|
||||
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
|
||||
dll = CONFIG["LIBRUBY_SO", enable_shared]
|
||||
lib = CONFIG["LIBRUBY", true]
|
||||
|
@ -823,7 +822,7 @@ install?(:ext, :comm, :gem, :'bundled-gems') do
|
|||
inst.spec.extension_dir = with_destdir(inst.spec.extension_dir)
|
||||
begin
|
||||
Gem::DefaultUserInteraction.use_ui(silent) {inst.install}
|
||||
rescue Gem::InstallError => e
|
||||
rescue Gem::InstallError
|
||||
next
|
||||
end
|
||||
gemname = File.basename(gem)
|
||||
|
|
|
@ -205,7 +205,7 @@ class << Readline
|
|||
def readline(prompt = '')
|
||||
console = IO.console
|
||||
console.binmode
|
||||
ly, lx = console.winsize
|
||||
_, lx = console.winsize
|
||||
if /mswin|mingw/ =~ RUBY_PLATFORM or /^(?:vt\d\d\d|xterm)/i =~ ENV["TERM"]
|
||||
cls = "\r\e[2K"
|
||||
else
|
||||
|
@ -329,7 +329,7 @@ def status_char(obj)
|
|||
end
|
||||
|
||||
console = IO.console
|
||||
row, col = console.winsize
|
||||
row, = console.winsize
|
||||
@query['limit'] = row - 2
|
||||
puts "Backporter #{VERSION}".color(bold: true) + " for #{TARGET_VERSION}"
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ class ArrayCode
|
|||
end
|
||||
|
||||
def insert_at_last(num, str)
|
||||
newnum = self.length + num
|
||||
# newnum = self.length + num
|
||||
@content << str
|
||||
@len += num
|
||||
end
|
||||
|
@ -235,7 +235,7 @@ class ActionMap
|
|||
all_rects = []
|
||||
|
||||
rects1.each {|rect|
|
||||
min, max, action = rect
|
||||
_, _, action = rect
|
||||
rect[2] = actions.length
|
||||
actions << action
|
||||
all_rects << rect
|
||||
|
@ -244,7 +244,7 @@ class ActionMap
|
|||
boundary = actions.length
|
||||
|
||||
rects2.each {|rect|
|
||||
min, max, action = rect
|
||||
_, _, action = rect
|
||||
rect[2] = actions.length
|
||||
actions << action
|
||||
all_rects << rect
|
||||
|
@ -273,7 +273,7 @@ class ActionMap
|
|||
singleton_rects = []
|
||||
region_rects = []
|
||||
rects.each {|rect|
|
||||
min, max, action = rect
|
||||
min, max, = rect
|
||||
if min == max
|
||||
singleton_rects << rect
|
||||
else
|
||||
|
@ -293,7 +293,7 @@ class ActionMap
|
|||
if region_rects.empty? ? s_rect[0].length == prefix.length : region_rects[0][0].empty?
|
||||
h = TMPHASH
|
||||
while (s_rect = @singleton_rects.last) && s_rect[0].start_with?(prefix)
|
||||
min, max, action = @singleton_rects.pop
|
||||
min, _, action = @singleton_rects.pop
|
||||
raise ArgumentError, "ambiguous pattern: #{prefix}" if min.length != prefix.length
|
||||
h[action] = true
|
||||
end
|
||||
|
@ -906,7 +906,7 @@ end
|
|||
|
||||
def transcode_generate_node(am, name_hint=nil)
|
||||
STDERR.puts "converter for #{name_hint}" if VERBOSE_MODE
|
||||
name = am.gennode(TRANSCODE_GENERATED_BYTES_CODE, TRANSCODE_GENERATED_WORDS_CODE, name_hint)
|
||||
am.gennode(TRANSCODE_GENERATED_BYTES_CODE, TRANSCODE_GENERATED_WORDS_CODE, name_hint)
|
||||
''
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче