diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/basic_object.rb | 5 | ||||
-rw-r--r-- | activesupport/lib/active_support/duration.rb | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/basic_object.rb b/activesupport/lib/active_support/basic_object.rb index 009a521a40..bb01a47508 100644 --- a/activesupport/lib/active_support/basic_object.rb +++ b/activesupport/lib/active_support/basic_object.rb @@ -6,6 +6,11 @@ module ActiveSupport class BasicObject < ::BasicObject undef_method :== undef_method :equal? + + # Let ActiveSupport::BasicObject at least raise exceptions. + def raise(*args) + ::Object.send(:raise, *args) + end end else require 'blankslate' diff --git a/activesupport/lib/active_support/duration.rb b/activesupport/lib/active_support/duration.rb index 82b38e79b5..ff51b49dcf 100644 --- a/activesupport/lib/active_support/duration.rb +++ b/activesupport/lib/active_support/duration.rb @@ -82,7 +82,7 @@ module ActiveSupport t.advance(type => sign * number) end else - raise ArgumentError, "expected a time or date, got #{time.inspect}" + raise ::ArgumentError, "expected a time or date, got #{time.inspect}" end end end |