diff options
Diffstat (limited to 'activesupport/lib')
5 files changed, 6 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index f2d9df6d13..6c0cae71ed 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -315,7 +315,7 @@ module ActiveSupport @config = { :terminator => "false", :scope => [ :kind ] - }.merge(config) + }.merge!(config) end def compile diff --git a/activesupport/lib/active_support/core_ext/string/indent.rb b/activesupport/lib/active_support/core_ext/string/indent.rb index afc3032272..ce3a69cf5f 100644 --- a/activesupport/lib/active_support/core_ext/string/indent.rb +++ b/activesupport/lib/active_support/core_ext/string/indent.rb @@ -29,7 +29,7 @@ class String # "foo\n\t\tbar".indent(2) # => "\t\tfoo\n\t\t\t\tbar" # "foo".indent(2, "\t") # => "\t\tfoo" # - # While +indent_string+ is tipically one space or tab, it may be any string. + # While +indent_string+ is typically one space or tab, it may be any string. # # The third argument, +indent_empty_lines+, is a flag that says whether # empty lines should be indented. Default is false. diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb index 306d80b2df..837db05dcc 100644 --- a/activesupport/lib/active_support/hash_with_indifferent_access.rb +++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb @@ -78,7 +78,7 @@ module ActiveSupport end def self.[](*args) - new.merge(Hash[*args]) + new.merge!(Hash[*args]) end alias_method :regular_writer, :[]= unless method_defined?(:regular_writer) diff --git a/activesupport/lib/active_support/notifications/instrumenter.rb b/activesupport/lib/active_support/notifications/instrumenter.rb index e0ae60e61f..0c9a729ce5 100644 --- a/activesupport/lib/active_support/notifications/instrumenter.rb +++ b/activesupport/lib/active_support/notifications/instrumenter.rb @@ -2,7 +2,7 @@ require 'securerandom' module ActiveSupport module Notifications - # Instrumentors are stored in a thread local. + # Instrumenters are stored in a thread local. class Instrumenter attr_reader :id diff --git a/activesupport/lib/active_support/testing/constant_lookup.rb b/activesupport/lib/active_support/testing/constant_lookup.rb index 52bfeb7179..1b2a75c35d 100644 --- a/activesupport/lib/active_support/testing/constant_lookup.rb +++ b/activesupport/lib/active_support/testing/constant_lookup.rb @@ -38,6 +38,8 @@ module ActiveSupport begin constant = names.join("::").constantize break(constant) if yield(constant) + rescue NoMethodError # subclass of NameError + raise rescue NameError # Constant wasn't found, move on ensure |