aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/time_with_zone.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-05-05 00:34:13 -0700
committerJosé Valim <jose.valim@gmail.com>2012-05-05 00:34:13 -0700
commitd6e2c81cfe31a4c05adc50cd49fa265c5d3cd3e6 (patch)
tree6b16e0438bb5c0b2620c2b21fcbc652f510ca559 /activesupport/lib/active_support/time_with_zone.rb
parent2ce5e4fa6c6f44eb0c5cbf812ca62aa03b802379 (diff)
parent14762dc5effbc7bb9ae94cb5af895a9a33512867 (diff)
downloadrails-d6e2c81cfe31a4c05adc50cd49fa265c5d3cd3e6.tar.gz
rails-d6e2c81cfe31a4c05adc50cd49fa265c5d3cd3e6.tar.bz2
rails-d6e2c81cfe31a4c05adc50cd49fa265c5d3cd3e6.zip
Merge pull request #6169 from marcandre/respond_to_missing
Respond to missing
Diffstat (limited to 'activesupport/lib/active_support/time_with_zone.rb')
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 1cb71012ef..120b2a4c28 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -311,10 +311,10 @@ module ActiveSupport
end
# Ensure proxy class responds to all methods that underlying time instance responds to.
- def respond_to?(sym, include_priv = false)
+ def respond_to_missing?(sym, include_priv)
# consistently respond false to acts_like?(:date), regardless of whether #time is a Time or DateTime
- return false if sym.to_s == 'acts_like_date?'
- super || time.respond_to?(sym, include_priv)
+ return false if sym.to_sym == :acts_like_date?
+ time.respond_to?(sym, include_priv)
end
# Send the missing method to +time+ instance, and wrap result in a new TimeWithZone with the existing +time_zone+.