aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2013-03-18 09:49:44 -0700
committerAndrew White <andyw@pixeltrix.co.uk>2013-03-18 09:49:44 -0700
commit341f9a079957d61afc5c05aec23a1efc9d608020 (patch)
treebb5063087c77cb26490ab948a8897e2f3cb81dc6 /activesupport/lib
parenteb32b3659d3ead36e66efe8ef2ced126110311a4 (diff)
parent836ea9fb425dc012cb0f6d57fdc2d8a28fcccc05 (diff)
downloadrails-341f9a079957d61afc5c05aec23a1efc9d608020.tar.gz
rails-341f9a079957d61afc5c05aec23a1efc9d608020.tar.bz2
rails-341f9a079957d61afc5c05aec23a1efc9d608020.zip
Merge pull request #9774 from senny/9772_reraise_no_method_error_in_proper_context
`TimeWithZone` raises `NoMethodError` in proper context.
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 98c866ac43..4a032b0ad0 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -366,6 +366,8 @@ module ActiveSupport
# TimeWithZone with the existing +time_zone+.
def method_missing(sym, *args, &block)
wrap_with_time_zone time.__send__(sym, *args, &block)
+ rescue NoMethodError => e
+ raise e, e.message.sub(time.inspect, self.inspect), e.backtrace
end
private