Skip to content

Commit

Permalink
Merge pull request matt-lowe#6 from Sarvatt/newer-ruby
Browse files Browse the repository at this point in the history
profanity.rb: Convert fixnum to an integer to be compatible with ruby 2.4
  • Loading branch information
rpherbig authored Apr 30, 2018
2 parents daadc97 + 090091a commit 57eb326
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion profanity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def update(new_value)
def redraw
setpos(0,0)
if @value
if @value.class == Fixnum
if @value.is_a?(Integer)
attron(color_pair(get_color_pair_id(@fg[@value], @bg[@value]))|Curses::A_NORMAL) { addstr @label }
else
attron(color_pair(get_color_pair_id(@fg[1], @bg[1]))|Curses::A_NORMAL) { addstr @label }
Expand Down

0 comments on commit 57eb326

Please sign in to comment.