Skip to content

Instantly share code, notes, and snippets.

@hsbt
Created February 12, 2019 13:28
Show Gist options
  • Save hsbt/edc15947761495c2ae35739b57074d3d to your computer and use it in GitHub Desktop.
Save hsbt/edc15947761495c2ae35739b57074d3d to your computer and use it in GitHub Desktop.
require 'find'
require 'open3'
Dir.glob("latest-gem/*") do |dir|
Find.find(dir) do |fn|
next unless File.file? fn
_, stdout, _ = *Open3.popen3("ruby -c #{fn}")
if stdout.read.chomp != "Syntax OK"
puts fn
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment