Skip to content

Commit

Permalink
Fix deprecated warnings (#77)
Browse files Browse the repository at this point in the history
* rename File.exists? -> File.exist?

* Fixnum is deprecated, use Integer
  • Loading branch information
shokai committed Dec 9, 2017
1 parent 3dde157 commit 82cece5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/tw/conf.rb
Expand Up @@ -31,7 +31,7 @@ def self.conf_file=(fpath)
def self.conf
@@conf ||= (
res = default
if File.exists? self.conf_file
if File.exist? self.conf_file
begin
data = nil
self.open_conf_file do |f|
Expand Down Expand Up @@ -84,7 +84,7 @@ def self.open_conf_file(opt=nil, &block)
else
return open(self.conf_file, opt)
end
File.chmod 0600, self.conf_file if File.exists? self.conf_file
File.chmod 0600, self.conf_file if File.exist? self.conf_file
end
end
end
2 changes: 1 addition & 1 deletion test/test_tw.rb
Expand Up @@ -15,7 +15,7 @@ def user?(str)
def response?(arr)
return false unless arr.kind_of? Array
arr.each do |i|
return false if !(i.id.class == Fixnum and
return false if !(i.id.class == Integer and
(user? i.user or (user? i.user[:to] and user? i.user[:from])) and
i.text.kind_of? String and
i.time.kind_of? Time)
Expand Down

0 comments on commit 82cece5

Please sign in to comment.