From aa37991e436fb4284a16c324ab5115d73784ff38 Mon Sep 17 00:00:00 2001 From: amitkumarsuroliya Date: Sun, 11 Oct 2015 02:40:29 +0530 Subject: Improved `KeyError` messages on bang version, since commit https://github.com/rails/rails/commit/e768c519fb6015e00961702a5165c6dab548a954 bang version produces `KeyError` [ci skip] --- activesupport/lib/active_support/ordered_options.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/ordered_options.rb b/activesupport/lib/active_support/ordered_options.rb index 45864990ce..53a55bd986 100644 --- a/activesupport/lib/active_support/ordered_options.rb +++ b/activesupport/lib/active_support/ordered_options.rb @@ -20,7 +20,7 @@ module ActiveSupport # To raise an exception when the value is blank, append a # bang to the key name, like: # - # h.dog! # => raises KeyError + # h.dog! # => raises KeyError: key not found: :dog # class OrderedOptions < Hash alias_method :_get, :[] # preserve the original #[] method -- cgit v1.2.3