lib/sup/util/ncurses.rb in sup-0.22.1 vs lib/sup/util/ncurses.rb in sup-0.23
- old
+ new
@@ -74,11 +74,11 @@
def initialize(c = "", status = Ncurses::OK)
@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
## Proxy method for String's replace
def replace(c)
@@ -87,11 +87,11 @@
@status = c.status
super(c)
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
def to_character ; character? ? self : "<#{code}>" end ## Returns character or code as a string
@@ -258,10 +258,10 @@
end
## 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.
def form_driver c
Ncurses::Form.form_driver_w @form, c.status, c.code