diff options
Diffstat (limited to 'activesupport/lib')
10 files changed, 18 insertions, 25 deletions
diff --git a/activesupport/lib/active_support/core_ext/name_error.rb b/activesupport/lib/active_support/core_ext/name_error.rb index 2b617b0083..4af8f22821 100644 --- a/activesupport/lib/active_support/core_ext/name_error.rb +++ b/activesupport/lib/active_support/core_ext/name_error.rb @@ -1,7 +1,5 @@ - # Add a +missing_name+ method to NameError instances. -class NameError < StandardError - +class NameError < StandardError #:nodoc: # Add a method to obtain the missing name from a NameError. def missing_name $1 if /((::)?([A-Z]\w*)(::[A-Z]\w*)*)$/ =~ message @@ -16,5 +14,4 @@ class NameError < StandardError missing_name == name.to_s end end - end
\ No newline at end of file diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index f141cddc4a..449c8273ae 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -382,7 +382,7 @@ module Dependencies #:nodoc: end end - class LoadingModule + class LoadingModule #:nodoc: # Old style environment.rb referenced this method directly. Please note, it doesn't # actualy *do* anything any more. def self.root(*args) diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb index 3c1ceafcff..d2c6127461 100644 --- a/activesupport/lib/active_support/deprecation.rb +++ b/activesupport/lib/active_support/deprecation.rb @@ -1,7 +1,7 @@ require 'yaml' module ActiveSupport - module Deprecation + module Deprecation #:nodoc: mattr_accessor :debug self.debug = false @@ -81,7 +81,7 @@ module ActiveSupport # Warnings are not silenced by default. self.silenced = false - module ClassMethods + module ClassMethods #:nodoc: # Declare that a method has been deprecated. def deprecate(*method_names) options = method_names.last.is_a?(Hash) ? method_names.pop : {} @@ -112,7 +112,7 @@ module ActiveSupport end end - module Assertions + module Assertions #:nodoc: def assert_deprecated(match = nil, &block) result, warnings = collect_deprecations(&block) assert !warnings.empty?, "Expected a deprecation warning within the block but received none" @@ -145,7 +145,7 @@ module ActiveSupport # Stand-in for @request, @attributes, @params, etc which emits deprecation # warnings on any method call (except #inspect). - class DeprecatedInstanceVariableProxy + class DeprecatedInstanceVariableProxy #:nodoc: instance_methods.each { |m| undef_method m unless m =~ /^__/ } def initialize(instance, method, var = "@#{method}") diff --git a/activesupport/lib/active_support/multibyte.rb b/activesupport/lib/active_support/multibyte.rb index 5e518b65f0..9e17d06434 100644 --- a/activesupport/lib/active_support/multibyte.rb +++ b/activesupport/lib/active_support/multibyte.rb @@ -1,4 +1,4 @@ -module ActiveSupport::Multibyte +module ActiveSupport::Multibyte #:nodoc: DEFAULT_NORMALIZATION_FORM = :kc NORMALIZATIONS_FORMS = [:c, :kc, :d, :kd] UNICODE_VERSION = '5.0.0' diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index a9795de523..374adc7849 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -2,7 +2,7 @@ require 'active_support/multibyte/handlers/utf8_handler' require 'active_support/multibyte/handlers/passthru_handler' # Encapsulates all the functionality related to the Chars proxy. -module ActiveSupport::Multibyte +module ActiveSupport::Multibyte #:nodoc: # Chars enables you to work transparently with multibyte encodings in the Ruby String class without having extensive # knowledge about the encoding. A Chars object accepts a string upon initialization and proxies String methods in an # encoding safe manner. All the normal String methods are also implemented on the proxy. diff --git a/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb b/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb index b28e345585..916215c2ce 100644 --- a/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb +++ b/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb @@ -1,6 +1,6 @@ # Chars uses this handler when $KCODE is not set to 'UTF8'. Because this handler doesn't define any methods all call # will be forwarded to String. -class ActiveSupport::Multibyte::Handlers::PassthruHandler +class ActiveSupport::Multibyte::Handlers::PassthruHandler #:nodoc: # Return the original byteoffset def self.translate_offset(string, byte_offset) #:nodoc: diff --git a/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb b/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb index 0d13cebf5c..009950d33e 100644 --- a/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb +++ b/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb @@ -1,6 +1,7 @@ # Contains all the handlers and helper classes -module ActiveSupport::Multibyte::Handlers - class EncodingError < ArgumentError; end +module ActiveSupport::Multibyte::Handlers #:nodoc: + class EncodingError < ArgumentError #:nodoc: + end class Codepoint #:nodoc: attr_accessor :code, :combining_class, :decomp_type, :decomp_mapping, :uppercase_mapping, :lowercase_mapping diff --git a/activesupport/lib/active_support/multibyte/handlers/utf8_handler_proc.rb b/activesupport/lib/active_support/multibyte/handlers/utf8_handler_proc.rb index f551af6cc7..f10eecc622 100644 --- a/activesupport/lib/active_support/multibyte/handlers/utf8_handler_proc.rb +++ b/activesupport/lib/active_support/multibyte/handlers/utf8_handler_proc.rb @@ -1,8 +1,7 @@ # Methods in this handler call functions in the utf8proc ruby extension. These are significantly faster than the # pure ruby versions. Chars automatically uses this handler when it can load the utf8proc extension. For # documentation on handler methods see UTF8Handler. -class ActiveSupport::Multibyte::Handlers::UTF8HandlerProc < ActiveSupport::Multibyte::Handlers::UTF8Handler - +class ActiveSupport::Multibyte::Handlers::UTF8HandlerProc < ActiveSupport::Multibyte::Handlers::UTF8Handler #:nodoc: class << self def normalize(str, form=ActiveSupport::Multibyte::DEFAULT_NORMALIZATION_FORM) #:nodoc: codepoints = str.unpack('U*') diff --git a/activesupport/lib/active_support/reloadable.rb b/activesupport/lib/active_support/reloadable.rb index baa8741b30..084bda1ee2 100644 --- a/activesupport/lib/active_support/reloadable.rb +++ b/activesupport/lib/active_support/reloadable.rb @@ -4,9 +4,8 @@ require 'active_support/deprecation' # # Deprecated as of Rails 1.2. # All autoloaded objects are now unloaded. -module Reloadable - class << self - +module Reloadable #:nodoc: + class << self def included(base) #nodoc: unless base.ancestors.include?(Reloadable::Subclasses) # Avoid double warning ActiveSupport::Deprecation.warn "Reloadable has been deprecated and has no effect.", caller @@ -37,7 +36,7 @@ module Reloadable # # Deprecated as of Rails 1.2. # All autoloaded objects are now unloaded. - module Subclasses + module Subclasses #:nodoc: def self.included(base) #nodoc: base.send :include, Reloadable ActiveSupport::Deprecation.warn "Reloadable::Subclasses has been deprecated and has no effect.", caller @@ -48,8 +47,7 @@ module Reloadable end end - module Deprecated - + module Deprecated #:nodoc: def self.included(base) class << base define_method(:reloadable?) do @@ -58,7 +56,5 @@ module Reloadable end end end - end - end
\ No newline at end of file diff --git a/activesupport/lib/active_support/vendor/xml_simple.rb b/activesupport/lib/active_support/vendor/xml_simple.rb index ec07966ff9..48b7289c65 100644 --- a/activesupport/lib/active_support/vendor/xml_simple.rb +++ b/activesupport/lib/active_support/vendor/xml_simple.rb @@ -15,7 +15,7 @@ class XmlSimple # A simple cache for XML documents that were already transformed # by xml_in. - class Cache + class Cache #:nodoc: # Creates and initializes a new Cache object. def initialize @mem_share_cache = {} |