Skip to content

Commit

Permalink
+ OMG A SECURITY ISSUE FOR CODE NOBODY USES... EVER
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//src/ruby_parser/dev/": change = 8297]
  • Loading branch information
zenspider committed Mar 8, 2013
1 parent 0ea5d7e commit 506c7e1
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions lib/gauntlet_rubyparser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,15 @@ def should_skip? name
def diff_pp o1, o2
require 'pp'

File.open("/tmp/a.#{$$}", "w") do |f|
PP.pp o1, f
end
Tempfile.new('ruby_parser_a') do |file_a|
PP.pp o1, file_a

File.open("/tmp/b.#{$$}", "w") do |f|
PP.pp o2, f
end
Tempfile.new('ruby_parser_b') do |file_b|
PP.pp o2, file_b

`diff -u /tmp/a.#{$$} /tmp/b.#{$$}`
ensure
File.unlink "/tmp/a.#{$$}" rescue nil
File.unlink "/tmp/b.#{$$}" rescue nil
`diff -u #{file_a.path} #{file_b.path}`
end
end
end

def broke name, file, msg
Expand Down

0 comments on commit 506c7e1

Please sign in to comment.