Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created January 15, 2009 05:59
Show Gist options
  • Save ELLIOTTCABLE/47279 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/47279 to your computer and use it in GitHub Desktop.
class String
def to_ascii_encode
old_kcode, $KCODE = $KCODE, 'ascii'
result = inspect[1..-2]
$KCODE = old_kcode
result
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment