aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2016-02-19 15:59:09 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2016-02-19 15:59:09 -0800
commit0c9f5f56f7a1628c8c9ff3a91a52f17a15e31b26 (patch)
tree3818883184b07c64ba7e96f88cfc0f8734e54405 /activesupport/lib
parent8a5059383e7bf4bfe0bfd308ab511d578b1a6ce8 (diff)
parent2df891dccdcfbdfb176c55297589712ac379f87d (diff)
downloadrails-0c9f5f56f7a1628c8c9ff3a91a52f17a15e31b26.tar.gz
rails-0c9f5f56f7a1628c8c9ff3a91a52f17a15e31b26.tar.bz2
rails-0c9f5f56f7a1628c8c9ff3a91a52f17a15e31b26.zip
Merge branch 'master' into treewip
* master: eliminate warnings about multiple primary keys on habtm join tables Add methods to array delegation from `Relation` Fix button_to's params option to support nested names. Dependencies clean up Deprecate AC::Parameters#== with a Hash Fix AC::Parameters#== with other AC::Parameters Tests for AC::Parameters#== better docs for ActiveSupport::TestCase#assert_nothing_raised remove needless `debug_exception_response_format` config [ci skip] partial pass over the API guide [ci skip] Fix `unsubscribed` server side behavior Use a semaphore to signal message availability Fix master build Remove github gems from the master bug report templates Truncate ActionCable broadcast message to 300 chars Remove unused require
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/dependencies.rb6
-rw-r--r--activesupport/lib/active_support/test_case.rb7
2 files changed, 8 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index af18ff746f..fd9fbff96a 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -145,9 +145,9 @@ module ActiveSupport #:nodoc:
# Get a list of the constants that were added
new_constants = mod.local_constants - original_constants
- # self[namespace] returns an Array of the constants that are being evaluated
+ # @stack[namespace] returns an Array of the constants that are being evaluated
# for that namespace. For instance, if parent.rb requires child.rb, the first
- # element of self[Object] will be an Array of the constants that were present
+ # element of @stack[Object] will be an Array of the constants that were present
# before parent.rb was required. The second element will be an Array of the
# constants that were present before child.rb was required.
@stack[namespace].each do |namespace_constants|
@@ -262,7 +262,7 @@ module ActiveSupport #:nodoc:
end
def load_dependency(file)
- if Dependencies.load? && ActiveSupport::Dependencies.constant_watch_stack.watching?
+ if Dependencies.load? && Dependencies.constant_watch_stack.watching?
Dependencies.new_constants_in(Object) { yield }
else
yield
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb
index d9a668c0ea..4dc84e4a59 100644
--- a/activesupport/lib/active_support/test_case.rb
+++ b/activesupport/lib/active_support/test_case.rb
@@ -66,10 +66,13 @@ module ActiveSupport
alias :assert_not_respond_to :refute_respond_to
alias :assert_not_same :refute_same
- # Reveals the intention that the block should not raise any exception.
+
+ # Assertion that the block should not raise an exception.
+ #
+ # Passes if evaluated code in the yielded block raises no exception.
#
# assert_nothing_raised do
- # ...
+ # perform_service(param: 'no_exception')
# end
def assert_nothing_raised(*args)
yield