summaryrefslogtreecommitdiff
path: root/lib/plist/generator.rb
diff options
context:
space:
mode:
authorMatt Brictson <mattbrictson@users.noreply.github.com>2017-04-17 17:24:30 -0700
committerGitHub <noreply@github.com>2017-04-17 17:24:30 -0700
commitf236783d69dfb0fc1daa1a4f187dde3792190449 (patch)
tree76c64a52ca29f661526e61a4b53e1f9133051cf4 /lib/plist/generator.rb
parente8c8321a1a7db230f23c75517ebbeda0c614e823 (diff)
downloadplist-f236783d69dfb0fc1daa1a4f187dde3792190449.tar.gz
Fix Fixnum, Bignum deprecations in Ruby 2.4 (#33)
Fixnum and Bignum have been deprecated in Ruby 2.4. In any case, both of these classes are subclasses of Integer, so using just Integer in the case statements is sufficient. Remove references to Fixnum and Bignum to silence the deprecations warnings.
Diffstat (limited to 'lib/plist/generator.rb')
-rw-r--r--lib/plist/generator.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/plist/generator.rb b/lib/plist/generator.rb
index 3b84c30..e653675 100644
--- a/lib/plist/generator.rb
+++ b/lib/plist/generator.rb
@@ -94,7 +94,7 @@ module Plist::Emit
output << tag('date', element.utc.strftime('%Y-%m-%dT%H:%M:%SZ'))
when Date # also catches DateTime
output << tag('date', element.strftime('%Y-%m-%dT%H:%M:%SZ'))
- when String, Symbol, Fixnum, Bignum, Integer, Float
+ when String, Symbol, Integer, Float
output << tag(element_type(element), CGI::escapeHTML(element.to_s))
when IO, StringIO
element.rewind
@@ -159,7 +159,7 @@ module Plist::Emit
when String, Symbol
'string'
- when Fixnum, Bignum, Integer
+ when Integer
'integer'
when Float