sigsurv 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -0
- data/lib/sigsurv.rb +2 -1
- data/lib/sigsurv/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
data/lib/sigsurv.rb
CHANGED
@@ -5,7 +5,8 @@ module Sigsurv
|
|
5
5
|
def self.analyze(directory)
|
6
6
|
Dir["#{directory}/**/*\.rb"].map do |file_path|
|
7
7
|
contents = IO.read(file_path)
|
8
|
-
|
8
|
+
regex = Regexp.new(SYMBOLS.keys.map{|k| "\\b#{k}\\b"}.join("|"))
|
9
|
+
[file_path, contents.scan(regex).map{|x| SYMBOLS[x.to_sym]}.join]
|
9
10
|
end
|
10
11
|
end
|
11
12
|
end
|
data/lib/sigsurv/version.rb
CHANGED