Skip to content

Instantly share code, notes, and snippets.

View tammymakesthings's full-sized avatar

Tammy Cravit tammymakesthings

View GitHub Profile
############################################
# In lib/do_evil_things_to_strings.rb
############################################
class String
old_is_utf8 = instance_method(:is_utf8?)
define_method(:is_utf8?) do
return false if calling_method == 'quote'
old_is_utf8.bind(self).()