Skip to content

Commit

Permalink
Merge pull request #5 from robmckinnon/ruby-2-4-update
Browse files Browse the repository at this point in the history
Replace Fixnum with Integer to prevent deprecation warning
  • Loading branch information
robmckinnon authored Mar 20, 2017
2 parents 4aafcef + 4bf228d commit 7cfb9ce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: ruby
rvm:
- 2.4.0
- 2.3.1
- 2.2.5
- ruby-head
- rbx-3.13
bundler_args: --without test
script: bundle exec rspec spec
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
v0.5.1. replace Fixnum with Integer to prevent deprecation warning in Ruby 2.4

v0.5.0. set accessor methods when attribute value is blank, instead of ignoring

v0.4.0. add from_json() and register_listener() methods
Expand Down
4 changes: 2 additions & 2 deletions lib/morph.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def self.convert_to_morph_method_name label
end

module Morph
VERSION = '0.5.0' unless defined? Morph::VERSION
VERSION = '0.5.1' unless defined? Morph::VERSION

class << self
def classes
Expand Down Expand Up @@ -303,7 +303,7 @@ def add_to_object object, attributes, namespace
value = value.to_time if defined?(XMLRPC::DateTime) && value.is_a?(XMLRPC::DateTime)

case value
when String, Date, Time, TrueClass, FalseClass, Fixnum, Float
when String, Date, Time, TrueClass, FalseClass, Integer, Float
object.morph(attribute, value)
when Array
attribute = attribute.pluralize
Expand Down

0 comments on commit 7cfb9ce

Please sign in to comment.