Skip to content

Instantly share code, notes, and snippets.

@lumeet
lumeet / gist:75e56f01ff996187dbc0
Created January 24, 2015 19:05
Scan JRuby test excludes
#!/usr/bin/env bin/jruby
require 'fileutils'
def replace_file(path)
FileUtils.mv path, "#{path}.tmp"
File.open("#{path}.tmp", 'r') do |src|
File.open(path, 'w') do |dest|
src.each_line do |l|
line = yield l
dest.print line if line