diff config/initializers/ext_string.rb @ 125:61414d0a367b

Less breakage
author nanaya <me@nanaya.pro>
date Wed, 23 Aug 2017 16:35:58 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/initializers/ext_string.rb	Wed Aug 23 16:35:58 2017 +0900
@@ -0,0 +1,5 @@
+class String
+  def printable
+    gsub(/[^\n[:print:]]/, '')
+  end
+end