diff options
-rw-r--r-- | activesupport/lib/active_support/ordered_options.rb | 2 | ||||
-rw-r--r-- | guides/source/security.md | 2 |
2 files changed, 2 insertions, 2 deletions
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 diff --git a/guides/source/security.md b/guides/source/security.md index 5a6ac9446a..1b74d17dd6 100644 --- a/guides/source/security.md +++ b/guides/source/security.md @@ -1048,7 +1048,7 @@ If you want an exception to be raised when some key is blank, use the bang version: ```ruby -Rails.application.secrets.some_api_key! # => raises KeyError +Rails.application.secrets.some_api_key! # => raises KeyError: key not found: :some_api_key ``` Additional Resources |