Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- require 'epath'
- bom = "\xEF\xBB\xBF".force_encoding('binary')
- Path.glob('**/*.rb') do |file|
- next if file.binread(3) == bom
- previous = file.binread
- file.write bom + previous
- end
Add Comment
Please, Sign In to add comment