[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sup-devel] [PATCH 02/10] display_size is just size on Ruby 1.9
---
lib/sup/util.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/sup/util.rb b/lib/sup/util.rb
index f99e1c1..5f68d0d 100644
--- 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
--
1.6.3.3
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel