sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 39b2f7a30b1e21d8bfc3798b59aa231ebbe98c09
parent 10dc87c0f3fb0a1552cbf6467cc37ffeae66016a
Author: Whyme.Lyu <callme5long@gmail.com>
Date:   Tue, 23 Apr 2013 06:15:39 -0700

Merge pull request #32 from 5long/remove-rbconfig-warning

Remove rbconfig warning
Diffstat:
M bin/sup | 5 +++--
M lib/sup/message-chunks.rb | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/bin/sup b/bin/sup
@@ -117,9 +117,10 @@ end
 ##
 ## BSD users: if libc.so.6 is not found, try installing compat6x.
 require 'dl/import'
+require 'rbconfig'
 module LibC
   extend DL.const_defined?(:Importer) ? DL::Importer : DL::Importable
-  setlocale_lib = case Config::CONFIG['arch']
+  setlocale_lib = case RbConfig::CONFIG['arch']
     when /darwin/; "libc.dylib"
     when /cygwin/; "cygwin1.dll"
     else; "libc.so.6"
@@ -134,7 +135,7 @@ module LibC
   rescue RuntimeError => e
     warn "cannot dlload setlocale(); ncurses wide character support probably broken."
     warn "dlload error was #{e.class}: #{e.message}"
-    if Config::CONFIG['arch'] =~ /bsd/
+    if RbConfig::CONFIG['arch'] =~ /bsd/
       warn "BSD variant detected. You may have to install a compat6x package to acquire libc."
     end
   end
diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb
@@ -1,4 +1,5 @@
 require 'tempfile'
+require 'rbconfig'
 
 ## Here we define all the "chunks" that a message is parsed
 ## into. Chunks are used by ThreadViewMode to render a message. Chunks
@@ -146,7 +147,7 @@ EOS
     def initial_state; :open end
     def viewable?; @lines.nil? end
     def view_default! path
-      case Config::CONFIG['arch']
+      case RbConfig::CONFIG['arch']
         when /darwin/
           cmd = "open '#{path}'"
         else