diff --git a/activesupport/lib/binding_of_caller.rb b/activesupport/lib/binding_of_caller.rb index 64b945158c4ee345cdf2903921fd3e9d1ed926b9..7d31672a91e210842f977e84c254347b7406d9d0 100644 --- a/activesupport/lib/binding_of_caller.rb +++ b/activesupport/lib/binding_of_caller.rb @@ -1,7 +1,7 @@ begin require 'simplecc' rescue LoadError - def Continuation.create(*args, &block) + def Continuation.create(*args, &block) #:nodoc: cc = nil; result = callcc {|c| cc = c; block.call(cc) if block and args.empty?} result ||= args return *[cc, *result] @@ -33,7 +33,7 @@ def Continuation.create(*args, &block) # If you don't do this an Exception will be raised. Because of # the way that Binding.of_caller is implemented it has to be # done this way. -def Binding.of_caller(&block) +def Binding.of_caller(&block) #:nodoc: old_critical = Thread.critical Thread.critical = true count = 0 diff --git a/activesupport/lib/core_ext/hash.rb b/activesupport/lib/core_ext/hash.rb index 94466053ecbef2e90d2822c09b23cedb905a4089..a5c53db1e02bd57f368fbadda48d16c698e0cf43 100644 --- a/activesupport/lib/core_ext/hash.rb +++ b/activesupport/lib/core_ext/hash.rb @@ -1,5 +1,5 @@ require File.dirname(__FILE__) + '/hash/keys' -class Hash +class Hash #:nodoc: include ActiveSupport::CoreExtensions::Hash::Keys end diff --git a/activesupport/lib/core_ext/hash/keys.rb b/activesupport/lib/core_ext/hash/keys.rb index 0db37a637446c5b757c295f508c08cc70dc5944e..536995dd71fbebd594578f0f35c43c49ac0a4580 100644 --- a/activesupport/lib/core_ext/hash/keys.rb +++ b/activesupport/lib/core_ext/hash/keys.rb @@ -1,6 +1,6 @@ -module ActiveSupport - module CoreExtensions - module Hash +module ActiveSupport #:nodoc: + module CoreExtensions #:nodoc: + module Hash #:nodoc: module Keys # Return a new hash with all keys converted to symbols. @@ -29,7 +29,6 @@ def assert_valid_keys(valid_keys) unknown_keys = keys - valid_keys raise(ArgumentError, "Unknown key(s): #{unknown_keys.join(", ")}") unless unknown_keys.empty? end - end end end diff --git a/activesupport/lib/core_ext/numeric.rb b/activesupport/lib/core_ext/numeric.rb index 58b6f4a9d94d5fc88386f6bfbc7e64dad37ccb56..88fead7aa4be0679d01a10e5caa0b85e81bbfaa3 100644 --- a/activesupport/lib/core_ext/numeric.rb +++ b/activesupport/lib/core_ext/numeric.rb @@ -1,7 +1,7 @@ require File.dirname(__FILE__) + '/numeric/time' require File.dirname(__FILE__) + '/numeric/bytes' -class Numeric +class Numeric #:nodoc: include ActiveSupport::CoreExtensions::Numeric::Time include ActiveSupport::CoreExtensions::Numeric::Bytes end diff --git a/activesupport/lib/core_ext/numeric/bytes.rb b/activesupport/lib/core_ext/numeric/bytes.rb index 59846ff37edad48aaba0a3a6b67e83d0a707f42d..98e5e13abbb1f613bff53d78fe096d44dfa79b9a 100644 --- a/activesupport/lib/core_ext/numeric/bytes.rb +++ b/activesupport/lib/core_ext/numeric/bytes.rb @@ -1,8 +1,8 @@ -module ActiveSupport - module CoreExtensions - module Numeric +module ActiveSupport #:nodoc: + module CoreExtensions #:nodoc: + module Numeric #:nodoc: + # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes module Bytes - def bytes self end diff --git a/activesupport/lib/core_ext/numeric/time.rb b/activesupport/lib/core_ext/numeric/time.rb index ac5ecb8b7016fa0def0ebb31a1d30c01462848fc..43c0425b0081fb48e217b7ebd1102191855a24f7 100644 --- a/activesupport/lib/core_ext/numeric/time.rb +++ b/activesupport/lib/core_ext/numeric/time.rb @@ -1,6 +1,7 @@ -module ActiveSupport - module CoreExtensions - module Numeric +module ActiveSupport #:nodoc: + module CoreExtensions #:nodoc: + module Numeric #:nodoc: + # Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years module Time def minutes self * 60 diff --git a/activesupport/lib/core_ext/string.rb b/activesupport/lib/core_ext/string.rb index b50e44c598ab8b6fe17ddc507b31e5586af5a9f0..6d554b483c91d5a5fab813a069f2f8d5eeb4bb7a 100644 --- a/activesupport/lib/core_ext/string.rb +++ b/activesupport/lib/core_ext/string.rb @@ -1,5 +1,5 @@ require File.dirname(__FILE__) + '/string/inflections' -class String +class String #:nodoc: include ActiveSupport::CoreExtensions::String::Inflections end diff --git a/activesupport/lib/dependencies.rb b/activesupport/lib/dependencies.rb index 8bc6e991ce4099ca5c946e60dfba04582a7f5e22..c47faad38d7433c847efef1862c2b0487832d815 100644 --- a/activesupport/lib/dependencies.rb +++ b/activesupport/lib/dependencies.rb @@ -38,7 +38,7 @@ def require_or_load(file_name) Object.send(:define_method, :require_dependency) { |file_name| Dependencies.depend_on(file_name) } unless Object.respond_to?(:require_dependency) Object.send(:define_method, :require_association) { |file_name| Dependencies.associate_with(file_name) } unless Object.respond_to?(:require_association) -class Object +class Object #:nodoc: class << self # Use const_missing to autoload associations so we don't have to # require_association when using single-table inheritance. diff --git a/railties/lib/binding_of_caller.rb b/railties/lib/binding_of_caller.rb index 64b945158c4ee345cdf2903921fd3e9d1ed926b9..7d31672a91e210842f977e84c254347b7406d9d0 100644 --- a/railties/lib/binding_of_caller.rb +++ b/railties/lib/binding_of_caller.rb @@ -1,7 +1,7 @@ begin require 'simplecc' rescue LoadError - def Continuation.create(*args, &block) + def Continuation.create(*args, &block) #:nodoc: cc = nil; result = callcc {|c| cc = c; block.call(cc) if block and args.empty?} result ||= args return *[cc, *result] @@ -33,7 +33,7 @@ def Continuation.create(*args, &block) # If you don't do this an Exception will be raised. Because of # the way that Binding.of_caller is implemented it has to be # done this way. -def Binding.of_caller(&block) +def Binding.of_caller(&block) #:nodoc: old_critical = Thread.critical Thread.critical = true count = 0