sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 7a74edbe9aa64a0b4e1ee606ea51935b57e294ab
parent a6bb5660cfe4b6ad85e2a50bdba2467cdb23c745
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date:   Thu, 31 Dec 2009 15:36:50 -0800

display_size is just size on Ruby 1.9

Diffstat:
M lib/sup/util.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/util.rb b/lib/sup/util.rb
@@ -177,7 +177,7 @@ class String
   ## nasty multibyte hack for ruby 1.8. if it's utf-8, split into chars using
   ## the utf8 regex and count those. otherwise, use the byte length.
   def display_length
-    if $encoding == "UTF-8" || $encoding == "utf8"
+    if RUBY_VERSION < '1.9.1' && ($encoding == "UTF-8" || $encoding == "utf8")
       scan(/./u).size
     else
       size