Skip to content

Instantly share code, notes, and snippets.

@benweint
Created April 4, 2013 22:04
Show Gist options
  • Save benweint/5314795 to your computer and use it in GitHub Desktop.
Save benweint/5314795 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
text = "</</h"
outpath = 'text.txt'
File.open(outpath, 'w') { |f| f.write(text) }
text_read = File.read(outpath)
puts "text == text_read => #{(text == text_read).inspect}"
puts "text.index('</h') => #{text.index('</h')}"
puts "text_read.index('</h') => #{text_read.index('</h')}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment