lib/tzinfo/time_or_datetime.rb in tzinfo-0.3.35 vs lib/tzinfo/time_or_datetime.rb in tzinfo-0.3.36

- old
+ new

@@ -1,7 +1,7 @@ #-- -# Copyright (c) 2006-2010 Philip Ross +# Copyright (c) 2006-2012 Philip Ross # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -249,10 +249,10 @@ # Returns true if todt represents the same time and was originally # constructed with the same type (DateTime, Time or timestamp) as this # TimeOrDateTime. def eql?(todt) - todt.respond_to?(:to_orig) && to_orig.eql?(todt.to_orig) + todt.kind_of?(TimeOrDateTime) && to_orig.eql?(todt.to_orig) end # Returns a hash of this TimeOrDateTime. def hash @orig.hash