thin_metadata_size: add an index variable to init_units and fiy a message type
This commit is contained in:
@@ -29,8 +29,9 @@ def init_units
|
||||
|
||||
units[:factors][0] = 512
|
||||
1.step(8) do |e|
|
||||
units[:factors][(e - 1) * 2 + 1] = 1024**e
|
||||
units[:factors][(e - 1) * 2 + 2] = 1000**e
|
||||
i = (e - 1) * 2 + 1
|
||||
units[:factors][i] = 1024**e
|
||||
units[:factors][i + 1] = 1000**e
|
||||
end
|
||||
units
|
||||
end
|
||||
@@ -73,7 +74,7 @@ def parse_command_line(argv, units)
|
||||
o.on("-n", "--numeric-only", "Output numeric value only.") do
|
||||
opts[:numeric] = true
|
||||
end
|
||||
o.on("-h", "--help", "Outout this help.") do
|
||||
o.on("-h", "--help", "Output this help.") do
|
||||
puts o
|
||||
exit
|
||||
end
|
||||
|
Reference in New Issue
Block a user