Guest User

Untitled

a guest
Sep 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2. require 'epath'
  3.  
  4. bom = "\xEF\xBB\xBF".force_encoding('binary')
  5. Path.glob('**/*.rb') do |file|
  6. next if file.binread(3) == bom
  7. previous = file.binread
  8. file.write bom + previous
  9. end
Add Comment
Please, Sign In to add comment