mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
2b7bde7eff
commit
36bc8c0b28
10 changed files with 16 additions and 26 deletions
|
@ -93,7 +93,7 @@ def generate_from_ucs(params, pairs)
|
||||||
end
|
end
|
||||||
|
|
||||||
def make_pairs(code_map)
|
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 }
|
acc += range.map{|uni| pair = [uni, Integer(ch)]; ch = ch.succ; next pair }
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -229,7 +229,6 @@ def parse_GraphemeBreakProperty(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse_block(data)
|
def parse_block(data)
|
||||||
current = nil
|
|
||||||
cps = []
|
cps = []
|
||||||
blocks = []
|
blocks = []
|
||||||
data_foreach('Blocks.txt') do |line|
|
data_foreach('Blocks.txt') do |line|
|
||||||
|
|
|
@ -107,7 +107,6 @@ def calc_each data
|
||||||
end
|
end
|
||||||
|
|
||||||
def calc_stat stats
|
def calc_stat stats
|
||||||
stat = []
|
|
||||||
stats[0].each_with_index{|e, idx|
|
stats[0].each_with_index{|e, idx|
|
||||||
bm = e[0]
|
bm = e[0]
|
||||||
vals = stats.map{|st|
|
vals = stats.map{|st|
|
||||||
|
@ -134,8 +133,7 @@ def stat
|
||||||
}
|
}
|
||||||
# pp total
|
# pp total
|
||||||
total[0].each_with_index{|e, idx|
|
total[0].each_with_index{|e, idx|
|
||||||
bm = e[0]
|
# print "#{e[0]}\t"
|
||||||
# print "#{bm}\t"
|
|
||||||
total.each{|st|
|
total.each{|st|
|
||||||
print st[idx][1], "\t"
|
print st[idx][1], "\t"
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,6 @@ while /\A(\w+)=(.*)/ =~ ARGV[0]
|
||||||
ARGV.shift
|
ARGV.shift
|
||||||
end
|
end
|
||||||
|
|
||||||
re = /@(#{config.keys.map {|k| Regexp.quote(k)}.join('|')})@/
|
|
||||||
|
|
||||||
if $output
|
if $output
|
||||||
output = open($output, "wb", $mode &&= $mode.oct)
|
output = open($output, "wb", $mode &&= $mode.oct)
|
||||||
output.chmod($mode) if $mode
|
output.chmod($mode) if $mode
|
||||||
|
|
|
@ -14,7 +14,6 @@ $:.unshift(builddir)
|
||||||
posthook = proc do
|
posthook = proc do
|
||||||
config = RbConfig::CONFIG
|
config = RbConfig::CONFIG
|
||||||
mkconfig = RbConfig::MAKEFILE_CONFIG
|
mkconfig = RbConfig::MAKEFILE_CONFIG
|
||||||
extout = File.expand_path(mkconfig["EXTOUT"], builddir)
|
|
||||||
[
|
[
|
||||||
["top_srcdir", $top_srcdir],
|
["top_srcdir", $top_srcdir],
|
||||||
["topdir", $topdir],
|
["topdir", $topdir],
|
||||||
|
|
|
@ -31,7 +31,7 @@ text.gsub!(/^\};/, "")
|
||||||
# probename()
|
# probename()
|
||||||
text.gsub!(/probe (.+)\( *\);/) {
|
text.gsub!(/probe (.+)\( *\);/) {
|
||||||
probe_name = $1
|
probe_name = $1
|
||||||
probe = <<-End
|
<<-End
|
||||||
probe #{probe_name} = process("ruby").provider("ruby").mark("#{probe_name}")
|
probe #{probe_name} = process("ruby").provider("ruby").mark("#{probe_name}")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ text.gsub!(/ *probe (.+)\(([^,)]+)\);/) {
|
||||||
probe_name = $1
|
probe_name = $1
|
||||||
arg1 = $2
|
arg1 = $2
|
||||||
|
|
||||||
probe = <<-End
|
<<-End
|
||||||
probe #{probe_name} = process("ruby").provider("ruby").mark("#{probe_name}")
|
probe #{probe_name} = process("ruby").provider("ruby").mark("#{probe_name}")
|
||||||
{
|
{
|
||||||
#{set_argument(arg1, 1)}
|
#{set_argument(arg1, 1)}
|
||||||
|
@ -57,7 +57,7 @@ text.gsub!(/ *probe (.+)\(([^,)]+),([^,)]+)\);/) {
|
||||||
arg1 = $2
|
arg1 = $2
|
||||||
arg2 = $3
|
arg2 = $3
|
||||||
|
|
||||||
probe = <<-End
|
<<-End
|
||||||
probe #{probe_name} = process("#{ruby_path}").provider("ruby").mark("#{probe_name}")
|
probe #{probe_name} = process("#{ruby_path}").provider("ruby").mark("#{probe_name}")
|
||||||
{
|
{
|
||||||
#{set_argument(arg1, 1)}
|
#{set_argument(arg1, 1)}
|
||||||
|
@ -73,7 +73,7 @@ text.gsub!(/ *probe (.+)\(([^,)]+),([^,)]+),([^,)]+)\);/) {
|
||||||
arg2 = $3
|
arg2 = $3
|
||||||
arg3 = $4
|
arg3 = $4
|
||||||
|
|
||||||
probe = <<-End
|
<<-End
|
||||||
probe #{probe_name} = process("#{ruby_path}").provider("ruby").mark("#{probe_name}")
|
probe #{probe_name} = process("#{ruby_path}").provider("ruby").mark("#{probe_name}")
|
||||||
{
|
{
|
||||||
#{set_argument(arg1, 1)}
|
#{set_argument(arg1, 1)}
|
||||||
|
@ -91,7 +91,7 @@ text.gsub!(/ *probe (.+)\(([^,)]+),([^,)]+),([^,)]+),([^,)]+)\);/) {
|
||||||
arg3 = $4
|
arg3 = $4
|
||||||
arg4 = $5
|
arg4 = $5
|
||||||
|
|
||||||
probe = <<-End
|
<<-End
|
||||||
probe #{probe_name} = process("#{ruby_path}").provider("ruby").mark("#{probe_name}")
|
probe #{probe_name} = process("#{ruby_path}").provider("ruby").mark("#{probe_name}")
|
||||||
{
|
{
|
||||||
#{set_argument(arg1, 1)}
|
#{set_argument(arg1, 1)}
|
||||||
|
@ -103,4 +103,3 @@ text.gsub!(/ *probe (.+)\(([^,)]+),([^,)]+),([^,)]+),([^,)]+)\);/) {
|
||||||
}
|
}
|
||||||
|
|
||||||
print text
|
print text
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,6 @@ config.each_value {|s| RbConfig.expand(s, config)}
|
||||||
srcdir = config["srcdir"] ||= File.dirname(__FILE__)
|
srcdir = config["srcdir"] ||= File.dirname(__FILE__)
|
||||||
top_srcdir = config["top_srcdir"] ||= File.dirname(srcdir)
|
top_srcdir = config["top_srcdir"] ||= File.dirname(srcdir)
|
||||||
extout = ARGV[0] || config["EXTOUT"]
|
extout = ARGV[0] || config["EXTOUT"]
|
||||||
version = config["ruby_version"]
|
|
||||||
arch = config["arch"]
|
arch = config["arch"]
|
||||||
bindir = config["bindir"]
|
bindir = config["bindir"]
|
||||||
libdirname = config["libdirname"]
|
libdirname = config["libdirname"]
|
||||||
|
@ -104,7 +103,6 @@ vendordir = config["vendordir"]
|
||||||
rubylibdir = config["rubylibdir"]
|
rubylibdir = config["rubylibdir"]
|
||||||
rubyarchdir = config["rubyarchdir"]
|
rubyarchdir = config["rubyarchdir"]
|
||||||
archdir = "#{extout}/#{arch}"
|
archdir = "#{extout}/#{arch}"
|
||||||
rubylibs = [vendordir, rubylibdir, rubyarchdir]
|
|
||||||
[bindir, libdir, archdir].uniq.each do |dir|
|
[bindir, libdir, archdir].uniq.each do |dir|
|
||||||
File.directory?(dir) or mkdir_p(dir)
|
File.directory?(dir) or mkdir_p(dir)
|
||||||
end
|
end
|
||||||
|
|
|
@ -333,7 +333,6 @@ vendorlibdir = CONFIG["vendorlibdir"]
|
||||||
vendorarchlibdir = CONFIG["vendorarchdir"]
|
vendorarchlibdir = CONFIG["vendorarchdir"]
|
||||||
mandir = CONFIG["mandir", true]
|
mandir = CONFIG["mandir", true]
|
||||||
docdir = CONFIG["docdir", true]
|
docdir = CONFIG["docdir", true]
|
||||||
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
|
|
||||||
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
|
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
|
||||||
dll = CONFIG["LIBRUBY_SO", enable_shared]
|
dll = CONFIG["LIBRUBY_SO", enable_shared]
|
||||||
lib = CONFIG["LIBRUBY", true]
|
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)
|
inst.spec.extension_dir = with_destdir(inst.spec.extension_dir)
|
||||||
begin
|
begin
|
||||||
Gem::DefaultUserInteraction.use_ui(silent) {inst.install}
|
Gem::DefaultUserInteraction.use_ui(silent) {inst.install}
|
||||||
rescue Gem::InstallError => e
|
rescue Gem::InstallError
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
gemname = File.basename(gem)
|
gemname = File.basename(gem)
|
||||||
|
|
|
@ -205,7 +205,7 @@ class << Readline
|
||||||
def readline(prompt = '')
|
def readline(prompt = '')
|
||||||
console = IO.console
|
console = IO.console
|
||||||
console.binmode
|
console.binmode
|
||||||
ly, lx = console.winsize
|
_, lx = console.winsize
|
||||||
if /mswin|mingw/ =~ RUBY_PLATFORM or /^(?:vt\d\d\d|xterm)/i =~ ENV["TERM"]
|
if /mswin|mingw/ =~ RUBY_PLATFORM or /^(?:vt\d\d\d|xterm)/i =~ ENV["TERM"]
|
||||||
cls = "\r\e[2K"
|
cls = "\r\e[2K"
|
||||||
else
|
else
|
||||||
|
@ -329,7 +329,7 @@ def status_char(obj)
|
||||||
end
|
end
|
||||||
|
|
||||||
console = IO.console
|
console = IO.console
|
||||||
row, col = console.winsize
|
row, = console.winsize
|
||||||
@query['limit'] = row - 2
|
@query['limit'] = row - 2
|
||||||
puts "Backporter #{VERSION}".color(bold: true) + " for #{TARGET_VERSION}"
|
puts "Backporter #{VERSION}".color(bold: true) + " for #{TARGET_VERSION}"
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ class ArrayCode
|
||||||
end
|
end
|
||||||
|
|
||||||
def insert_at_last(num, str)
|
def insert_at_last(num, str)
|
||||||
newnum = self.length + num
|
# newnum = self.length + num
|
||||||
@content << str
|
@content << str
|
||||||
@len += num
|
@len += num
|
||||||
end
|
end
|
||||||
|
@ -235,7 +235,7 @@ class ActionMap
|
||||||
all_rects = []
|
all_rects = []
|
||||||
|
|
||||||
rects1.each {|rect|
|
rects1.each {|rect|
|
||||||
min, max, action = rect
|
_, _, action = rect
|
||||||
rect[2] = actions.length
|
rect[2] = actions.length
|
||||||
actions << action
|
actions << action
|
||||||
all_rects << rect
|
all_rects << rect
|
||||||
|
@ -244,7 +244,7 @@ class ActionMap
|
||||||
boundary = actions.length
|
boundary = actions.length
|
||||||
|
|
||||||
rects2.each {|rect|
|
rects2.each {|rect|
|
||||||
min, max, action = rect
|
_, _, action = rect
|
||||||
rect[2] = actions.length
|
rect[2] = actions.length
|
||||||
actions << action
|
actions << action
|
||||||
all_rects << rect
|
all_rects << rect
|
||||||
|
@ -273,7 +273,7 @@ class ActionMap
|
||||||
singleton_rects = []
|
singleton_rects = []
|
||||||
region_rects = []
|
region_rects = []
|
||||||
rects.each {|rect|
|
rects.each {|rect|
|
||||||
min, max, action = rect
|
min, max, = rect
|
||||||
if min == max
|
if min == max
|
||||||
singleton_rects << rect
|
singleton_rects << rect
|
||||||
else
|
else
|
||||||
|
@ -293,7 +293,7 @@ class ActionMap
|
||||||
if region_rects.empty? ? s_rect[0].length == prefix.length : region_rects[0][0].empty?
|
if region_rects.empty? ? s_rect[0].length == prefix.length : region_rects[0][0].empty?
|
||||||
h = TMPHASH
|
h = TMPHASH
|
||||||
while (s_rect = @singleton_rects.last) && s_rect[0].start_with?(prefix)
|
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
|
raise ArgumentError, "ambiguous pattern: #{prefix}" if min.length != prefix.length
|
||||||
h[action] = true
|
h[action] = true
|
||||||
end
|
end
|
||||||
|
@ -906,7 +906,7 @@ end
|
||||||
|
|
||||||
def transcode_generate_node(am, name_hint=nil)
|
def transcode_generate_node(am, name_hint=nil)
|
||||||
STDERR.puts "converter for #{name_hint}" if VERBOSE_MODE
|
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
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue