lib/flay.rb in flay-1.4.2 vs lib/flay.rb in flay-1.4.3
- old
+ new
@@ -1,17 +1,14 @@
#!/usr/bin/env ruby -w
-$: << "../../ruby_parser/dev/lib"
-$: << "../../ruby2ruby/dev/lib"
-
require 'optparse'
require 'rubygems'
require 'sexp_processor'
require 'ruby_parser'
class Flay
- VERSION = '1.4.2'
+ VERSION = '1.4.3'
def self.default_options
{
:diff => false,
:mass => 16,
@@ -195,11 +192,11 @@
self.hashes.delete_if { |h,_| all_hashes[h] }
end
def n_way_diff *data
data.each_with_index do |s, i|
- c = (?A + i).chr
+ c = (?A.ord + i).chr
s.group = c
end
max = data.map { |s| s.scan(/^.*/).size }.max
@@ -272,10 +269,10 @@
puts "%d) %s code found in %p (mass%s = %d)" %
[count, match, node.first, bonus, mass]
nodes.each_with_index do |x, i|
if option[:diff] then
- c = (?A + i).chr
+ c = (?A.ord + i).chr
puts " #{c}: #{x.file}:#{x.line}"
else
puts " #{x.file}:#{x.line}"
end
end