sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 9a1e80f558a8042df52997c254dc1b72d945de59
parent 89f7e44d7de5dc282c47a22f4f7f753abffe8f94
Author: Dan Callaghan <dcallagh@redhat.com>
Date:   Mon, 30 Oct 2017 16:13:46 +1000

Fixnum is deprecated in Ruby 2.4

Diffstat:
M lib/sup/source.rb | 2 +-
M lib/sup/util.rb | 2 +-
M lib/sup/util/ncurses.rb | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/sup/source.rb b/lib/sup/source.rb
@@ -58,7 +58,7 @@ class Source
   attr_accessor :id
 
   def initialize uri, usual=true, archived=false, id=nil
-    raise ArgumentError, "id must be an integer: #{id.inspect}" unless id.is_a? Fixnum if id
+    raise ArgumentError, "id must be an integer: #{id.inspect}" unless id.is_a? Integer if id
 
     @uri = uri
     @usual = usual
diff --git a/lib/sup/util.rb b/lib/sup/util.rb
@@ -475,7 +475,7 @@ class Numeric
   end
 end
 
-class Fixnum
+class Integer
   def to_character
     if self < 128 && self >= 0
       chr
diff --git a/lib/sup/util/ncurses.rb b/lib/sup/util/ncurses.rb
@@ -76,7 +76,7 @@ module Ncurses
       @status = status
       c = "" if c.nil?
       return super("") if status == Ncurses::ERR
-      c = enc_char(c) if c.is_a?(Fixnum)
+      c = enc_char(c) if c.is_a?(Integer)
       super c.length > 1 ? c[0,1] : c
     end
 
@@ -89,7 +89,7 @@ module Ncurses
       else
         @status = Ncurses::OK
         c = "" if c.nil?
-        c = enc_char(c) if c.is_a?(Fixnum)
+        c = enc_char(c) if c.is_a?(Integer)
         super c.length > 1 ? c[0,1] : c
       end
     end
@@ -260,7 +260,7 @@ module Ncurses
       ## Ncurses::Form.form_driver_w wrapper for printable characters.
       def form_driver_char c
         form_driver CharCode.character(c)
-        #c.is_a?(Fixnum) ? c : c.ord
+        #c.is_a?(Integer) ? c : c.ord
       end
 
       ## Ncurses::Form.form_driver_w wrapper for charcodes.