<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -163,9 +163,9 @@ module ActionController #:nodoc:
       def helper_method(*methods)
         methods.flatten.each do |method|
           master_helper_module.module_eval &lt;&lt;-end_eval
-            def #{method}(*args, &amp;block)
-              controller.send(%(#{method}), *args, &amp;block)
-            end
+            def #{method}(*args, &amp;block)                    # def current_user(*args, &amp;block)
+              controller.send(%(#{method}), *args, &amp;block)  #   controller.send(%(current_user), *args, &amp;block)
+            end                                             # end
           end_eval
         end
       end</diff>
      <filename>actionpack/lib/action_controller/helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -148,9 +148,9 @@ module ActionController #:nodoc:
         sym = mime.is_a?(Symbol) ? mime : mime.to_sym
         const = sym.to_s.upcase
         class_eval &lt;&lt;-RUBY, __FILE__, __LINE__ + 1
-          def #{sym}(&amp;block)                          # def html(&amp;block)
-            custom(Mime::#{const}, &amp;block)            #   custom(Mime::HTML, &amp;block)
-          end                                         # end
+          def #{sym}(&amp;block)                # def html(&amp;block)
+            custom(Mime::#{const}, &amp;block)  #   custom(Mime::HTML, &amp;block)
+          end                               # end
         RUBY
       end
 </diff>
      <filename>actionpack/lib/action_controller/mime_responds.rb</filename>
    </modified>
    <modified>
      <diff>@@ -118,13 +118,17 @@ module ActionController
 
     %w(edit new).each do |action|
       module_eval &lt;&lt;-EOT, __FILE__, __LINE__
-        def #{action}_polymorphic_url(record_or_hash, options = {})
-          polymorphic_url(record_or_hash, options.merge(:action =&gt; &quot;#{action}&quot;))
-        end
-
-        def #{action}_polymorphic_path(record_or_hash, options = {})
-          polymorphic_url(record_or_hash, options.merge(:action =&gt; &quot;#{action}&quot;, :routing_type =&gt; :path))
-        end
+        def #{action}_polymorphic_url(record_or_hash, options = {})         # def edit_polymorphic_url(record_or_hash, options = {})
+          polymorphic_url(                                                  #   polymorphic_url(
+            record_or_hash,                                                 #     record_or_hash,
+            options.merge(:action =&gt; &quot;#{action}&quot;))                          #     options.merge(:action =&gt; &quot;edit&quot;))
+        end                                                                 # end
+                                                                            #
+        def #{action}_polymorphic_path(record_or_hash, options = {})        # def edit_polymorphic_path(record_or_hash, options = {})
+          polymorphic_url(                                                  #   polymorphic_url(
+            record_or_hash,                                                 #     record_or_hash,
+            options.merge(:action =&gt; &quot;#{action}&quot;, :routing_type =&gt; :path))  #     options.merge(:action =&gt; &quot;edit&quot;, :routing_type =&gt; :path))
+        end                                                                 # end
       EOT
     end
 </diff>
      <filename>actionpack/lib/action_controller/polymorphic_routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -145,10 +145,10 @@ module ActionController
           def define_hash_access(route, name, kind, options)
             selector = hash_access_name(name, kind)
             named_helper_module_eval &lt;&lt;-end_eval # We use module_eval to avoid leaks
-              def #{selector}(options = nil)
-                options ? #{options.inspect}.merge(options) : #{options.inspect}
-              end
-              protected :#{selector}
+              def #{selector}(options = nil)                                      # def hash_for_users_url(options = nil)
+                options ? #{options.inspect}.merge(options) : #{options.inspect}  #   options ? {:only_path=&gt;false}.merge(options) : {:only_path=&gt;false}
+              end                                                                 # end
+              protected :#{selector}                                              # protected :hash_for_users_url
             end_eval
             helpers &lt;&lt; selector
           end
@@ -173,32 +173,33 @@ module ActionController
             #   foo_url(bar, baz, bang, :sort_by =&gt; 'baz')
             #
             named_helper_module_eval &lt;&lt;-end_eval # We use module_eval to avoid leaks
-              def #{selector}(*args)
-
-                #{generate_optimisation_block(route, kind)}
-
-                opts = if args.empty? || Hash === args.first
-                  args.first || {}
-                else
-                  options = args.extract_options!
-                  args = args.zip(#{route.segment_keys.inspect}).inject({}) do |h, (v, k)|
-                    h[k] = v
-                    h
-                  end
-                  options.merge(args)
-                end
-
-                url_for(#{hash_access_method}(opts))
-                
-              end
-              #Add an alias to support the now deprecated formatted_* URL.
-              def formatted_#{selector}(*args)
-                ActiveSupport::Deprecation.warn(
-                  &quot;formatted_#{selector}() has been deprecated. please pass format to the standard&quot; +
-                  &quot;#{selector}() method instead.&quot;, caller)
-                #{selector}(*args)
-              end
-              protected :#{selector}
+              def #{selector}(*args)                                                        # def users_url(*args)
+                                                                                            #
+                #{generate_optimisation_block(route, kind)}                                 #   #{generate_optimisation_block(route, kind)}
+                                                                                            #
+                opts = if args.empty? || Hash === args.first                                #   opts = if args.empty? || Hash === args.first
+                  args.first || {}                                                          #     args.first || {}
+                else                                                                        #   else
+                  options = args.extract_options!                                           #     options = args.extract_options!
+                  args = args.zip(#{route.segment_keys.inspect}).inject({}) do |h, (v, k)|  #     args = args.zip([]).inject({}) do |h, (v, k)|
+                    h[k] = v                                                                #       h[k] = v
+                    h                                                                       #       h
+                  end                                                                       #     end
+                  options.merge(args)                                                       #     options.merge(args)
+                end                                                                         #   end
+                                                                                            #
+                url_for(#{hash_access_method}(opts))                                        #   url_for(hash_for_users_url(opts))
+                                                                                            #
+              end                                                                           # end
+              #Add an alias to support the now deprecated formatted_* URL.                  # #Add an alias to support the now deprecated formatted_* URL.
+              def formatted_#{selector}(*args)                                              # def formatted_users_url(*args)
+                ActiveSupport::Deprecation.warn(                                            #   ActiveSupport::Deprecation.warn(
+                  &quot;formatted_#{selector}() has been deprecated. &quot; +                         #     &quot;formatted_users_url() has been deprecated. &quot; +
+                  &quot;please pass format to the standard&quot; +                                    #     &quot;please pass format to the standard&quot; +
+                  &quot;#{selector}() method instead.&quot;, caller)                                  #     &quot;users_url() method instead.&quot;, caller)
+                #{selector}(*args)                                                          #   users_url(*args)
+              end                                                                           # end
+              protected :#{selector}                                                        # protected :users_url
             end_eval
             helpers &lt;&lt; selector
           end</diff>
      <filename>actionpack/lib/action_controller/routing/route_set.rb</filename>
    </modified>
    <modified>
      <diff>@@ -737,9 +737,13 @@ module ActionView
 
       (field_helpers - %w(label check_box radio_button fields_for)).each do |selector|
         src = &lt;&lt;-end_src
-          def #{selector}(method, options = {})
-            @template.send(#{selector.inspect}, @object_name, method, objectify_options(options))
-          end
+          def #{selector}(method, options = {})  # def text_field(method, options = {})
+            @template.send(                      #   @template.send(
+              #{selector.inspect},               #     &quot;text_field&quot;,
+              @object_name,                      #     @object_name,
+              method,                            #     method,
+              objectify_options(options))        #     objectify_options(options))
+          end                                    # end
         end_src
         class_eval src, __FILE__, __LINE__
       end</diff>
      <filename>actionpack/lib/action_view/helpers/form_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1216,11 +1216,11 @@ module ActiveRecord
         # callbacks will be executed after the association is wiped out.
         old_method = &quot;destroy_without_habtm_shim_for_#{reflection.name}&quot;
         class_eval &lt;&lt;-end_eval unless method_defined?(old_method)
-          alias_method :#{old_method}, :destroy_without_callbacks
-          def destroy_without_callbacks
-            #{reflection.name}.clear
-            #{old_method}
-          end
+          alias_method :#{old_method}, :destroy_without_callbacks  # alias_method :destroy_without_habtm_shim_for_posts, :destroy_without_callbacks
+          def destroy_without_callbacks                            # def destroy_without_callbacks
+            #{reflection.name}.clear                               #   posts.clear
+            #{old_method}                                          #   destroy_without_habtm_shim_for_posts
+          end                                                      # end
         end_eval
 
         add_association_callbacks(reflection.name, options)
@@ -1463,22 +1463,22 @@ module ActiveRecord
                 before_destroy method_name
               when :delete_all
                 module_eval %Q{
-                  before_destroy do |record|
-                    delete_all_has_many_dependencies(record,
-                      &quot;#{reflection.name}&quot;,
-                      #{reflection.class_name},
-                      %@#{dependent_conditions}@)
-                  end
+                  before_destroy do |record|                  # before_destroy do |record|
+                    delete_all_has_many_dependencies(record,  #   delete_all_has_many_dependencies(record,
+                      &quot;#{reflection.name}&quot;,                   #     &quot;posts&quot;,
+                      #{reflection.class_name},               #     Post,
+                      %@#{dependent_conditions}@)             #     %@...@) # this is a string literal like %(...)
+                  end                                         # end
                 }
               when :nullify
                 module_eval %Q{
-                  before_destroy do |record|
-                    nullify_has_many_dependencies(record,
-                      &quot;#{reflection.name}&quot;,
-                      #{reflection.class_name},
-                      &quot;#{reflection.primary_key_name}&quot;,
-                      %@#{dependent_conditions}@)
-                  end
+                  before_destroy do |record|                  # before_destroy do |record|
+                    nullify_has_many_dependencies(record,     #   nullify_has_many_dependencies(record,
+                      &quot;#{reflection.name}&quot;,                   #     &quot;posts&quot;,
+                      #{reflection.class_name},               #     Post,
+                      &quot;#{reflection.primary_key_name}&quot;,       #     &quot;user_id&quot;,
+                      %@#{dependent_conditions}@)             #     %@...@) # this is a string literal like %(...)
+                  end                                         # end
                 }
               else
                 raise ArgumentError, &quot;The :dependent option expects either :destroy, :delete_all, or :nullify (#{reflection.options[:dependent].inspect})&quot;</diff>
      <filename>activerecord/lib/active_record/associations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1818,10 +1818,31 @@ module ActiveRecord #:nodoc:
             if match.finder?
               finder = match.finder
               bang = match.bang?
+              # def self.find_by_login_and_activated(*args)
+              #   options = args.extract_options!
+              #   attributes = construct_attributes_from_arguments(
+              #     [:login,:activated],
+              #     args
+              #   )
+              #   finder_options = { :conditions =&gt; attributes }
+              #   validate_find_options(options)
+              #   set_readonly_option!(options)
+              #
+              #   if options[:conditions]
+              #     with_scope(:find =&gt; finder_options) do
+              #       find(:first, options)
+              #     end
+              #   else
+              #     find(:first, options.merge(finder_options))
+              #   end
+              # end
               self.class_eval %{
                 def self.#{method_id}(*args)
                   options = args.extract_options!
-                  attributes = construct_attributes_from_arguments([:#{attribute_names.join(',:')}], args)
+                  attributes = construct_attributes_from_arguments(
+                    [:#{attribute_names.join(',:')}],
+                    args
+                  )
                   finder_options = { :conditions =&gt; attributes }
                   validate_find_options(options)
                   set_readonly_option!(options)
@@ -1839,6 +1860,31 @@ module ActiveRecord #:nodoc:
               send(method_id, *arguments)
             elsif match.instantiator?
               instantiator = match.instantiator
+              # def self.find_or_create_by_user_id(*args)
+              #   guard_protected_attributes = false
+              #
+              #   if args[0].is_a?(Hash)
+              #     guard_protected_attributes = true
+              #     attributes = args[0].with_indifferent_access
+              #     find_attributes = attributes.slice(*[:user_id])
+              #   else
+              #     find_attributes = attributes = construct_attributes_from_arguments([:user_id], args)
+              #   end
+              #
+              #   options = { :conditions =&gt; find_attributes }
+              #   set_readonly_option!(options)
+              #
+              #   record = find(:first, options)
+              #
+              #   if record.nil?
+              #     record = self.new { |r| r.send(:attributes=, attributes, guard_protected_attributes) }
+              #     yield(record) if block_given?
+              #     record.save
+              #     record
+              #   else
+              #     record
+              #   end
+              # end
               self.class_eval %{
                 def self.#{method_id}(*args)
                   guard_protected_attributes = false</diff>
      <filename>activerecord/lib/active_record/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,12 +14,12 @@ module ActiveRecord
         def dirties_query_cache(base, *method_names)
           method_names.each do |method_name|
             base.class_eval &lt;&lt;-end_code, __FILE__, __LINE__
-              def #{method_name}_with_query_dirty(*args)
-                clear_query_cache if @query_cache_enabled
-                #{method_name}_without_query_dirty(*args)
-              end
-
-              alias_method_chain :#{method_name}, :query_dirty
+              def #{method_name}_with_query_dirty(*args)        # def update_with_query_dirty(*args)
+                clear_query_cache if @query_cache_enabled       #   clear_query_cache if @query_cache_enabled
+                #{method_name}_without_query_dirty(*args)       #   update_without_query_dirty(*args)
+              end                                               # end
+                                                                #
+              alias_method_chain :#{method_name}, :query_dirty  # alias_method_chain :update, :query_dirty
             end_code
           end
         end</diff>
      <filename>activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb</filename>
    </modified>
    <modified>
      <diff>@@ -476,12 +476,12 @@ module ActiveRecord
 
       %w( string text integer float decimal datetime timestamp time date binary boolean ).each do |column_type|
         class_eval &lt;&lt;-EOV
-          def #{column_type}(*args)
-            options = args.extract_options!
-            column_names = args
-
-            column_names.each { |name| column(name, '#{column_type}', options) }
-          end
+          def #{column_type}(*args)                                               # def string(*args)
+            options = args.extract_options!                                       #   options = args.extract_options!
+            column_names = args                                                   #   column_names = args
+                                                                                  #
+            column_names.each { |name| column(name, '#{column_type}', options) }  #   column_names.each { |name| column(name, 'string', options) }
+          end                                                                     # end
         EOV
       end
 
@@ -676,24 +676,24 @@ module ActiveRecord
       #  t.string(:goat, :sheep)
       %w( string text integer float decimal datetime timestamp time date binary boolean ).each do |column_type|
         class_eval &lt;&lt;-EOV
-          def #{column_type}(*args)
-            options = args.extract_options!
-            column_names = args
-
-            column_names.each do |name|
-              column = ColumnDefinition.new(@base, name, '#{column_type}')
-              if options[:limit]
-                column.limit = options[:limit]
-              elsif native['#{column_type}'.to_sym].is_a?(Hash)
-                column.limit = native['#{column_type}'.to_sym][:limit]
-              end
-              column.precision = options[:precision]
-              column.scale = options[:scale]
-              column.default = options[:default]
-              column.null = options[:null]
-              @base.add_column(@table_name, name, column.sql_type, options)
-            end
-          end
+          def #{column_type}(*args)                                          # def string(*args)
+            options = args.extract_options!                                  #   options = args.extract_options!
+            column_names = args                                              #   column_names = args
+                                                                             #
+            column_names.each do |name|                                      #   column_names.each do |name|
+              column = ColumnDefinition.new(@base, name, '#{column_type}')   #     column = ColumnDefinition.new(@base, name, 'string')
+              if options[:limit]                                             #     if options[:limit]
+                column.limit = options[:limit]                               #       column.limit = options[:limit]
+              elsif native['#{column_type}'.to_sym].is_a?(Hash)              #     elsif native['string'.to_sym].is_a?(Hash)
+                column.limit = native['#{column_type}'.to_sym][:limit]       #       column.limit = native['string'.to_sym][:limit]
+              end                                                            #     end
+              column.precision = options[:precision]                         #     column.precision = options[:precision]
+              column.scale = options[:scale]                                 #     column.scale = options[:scale]
+              column.default = options[:default]                             #     column.default = options[:default]
+              column.null = options[:null]                                   #     column.null = options[:null]
+              @base.add_column(@table_name, name, column.sql_type, options)  #     @base.add_column(@table_name, name, column.sql_type, options)
+            end                                                              #   end
+          end                                                                # end
         EOV
       end
 </diff>
      <filename>activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,23 +13,25 @@ module MysqlCompat #:nodoc:
     # C driver &gt;= 2.7 returns null values in each_hash
     if Mysql.const_defined?(:VERSION) &amp;&amp; (Mysql::VERSION.is_a?(String) || Mysql::VERSION &gt;= 20700)
       target.class_eval &lt;&lt;-'end_eval'
-      def all_hashes
-        rows = []
-        each_hash { |row| rows &lt;&lt; row }
-        rows
-      end
+      def all_hashes                     # def all_hashes
+        rows = []                        #   rows = []
+        each_hash { |row| rows &lt;&lt; row }  #   each_hash { |row| rows &lt;&lt; row }
+        rows                             #   rows
+      end                                # end
       end_eval
 
     # adapters before 2.7 don't have a version constant
     # and don't return null values in each_hash
     else
       target.class_eval &lt;&lt;-'end_eval'
-      def all_hashes
-        rows = []
-        all_fields = fetch_fields.inject({}) { |fields, f| fields[f.name] = nil; fields }
-        each_hash { |row| rows &lt;&lt; all_fields.dup.update(row) }
-        rows
-      end
+      def all_hashes                                            # def all_hashes
+        rows = []                                               #   rows = []
+        all_fields = fetch_fields.inject({}) { |fields, f|      #   all_fields = fetch_fields.inject({}) { |fields, f|
+          fields[f.name] = nil; fields                          #     fields[f.name] = nil; fields
+        }                                                       #   }
+        each_hash { |row| rows &lt;&lt; all_fields.dup.update(row) }  #   each_hash { |row| rows &lt;&lt; all_fields.dup.update(row) }
+        rows                                                    #   rows
+      end                                                       # end
       end_eval
     end
 </diff>
      <filename>activerecord/lib/active_record/connection_adapters/mysql_adapter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -950,13 +950,13 @@ module ActiveRecord
           # should know about this but can't detect it there, so deal with it here.
           money_precision = (postgresql_version &gt;= 80300) ? 19 : 10
           PostgreSQLColumn.module_eval(&lt;&lt;-end_eval)
-            def extract_precision(sql_type)
-              if sql_type =~ /^money$/
-                #{money_precision}
-              else
-                super
-              end
-            end
+            def extract_precision(sql_type)  # def extract_precision(sql_type)
+              if sql_type =~ /^money$/       #   if sql_type =~ /^money$/
+                #{money_precision}           #     19
+              else                           #   else
+                super                        #     super
+              end                            #   end
+            end                              # end
           end_eval
 
           configure_connection</diff>
      <filename>activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -174,7 +174,7 @@ module ActiveRecord
         alias_attribute_without_dirty(new_name, old_name)
         DIRTY_SUFFIXES.each do |suffix|
           module_eval &lt;&lt;-STR, __FILE__, __LINE__+1
-            def #{new_name}#{suffix}; self.#{old_name}#{suffix}; end
+            def #{new_name}#{suffix}; self.#{old_name}#{suffix}; end  # def subject_changed?; self.title_changed?; end
           STR
         end
       end</diff>
      <filename>activerecord/lib/active_record/dirty.rb</filename>
    </modified>
    <modified>
      <diff>@@ -54,6 +54,9 @@ module ActiveResource
       end
 
       for method in [ :post, :put, :get, :delete, :head ]
+        # def post(path, request_headers = {}, body = nil, status = 200, response_headers = {})
+        #   @responses[Request.new(:post, path, nil, request_headers)] = Response.new(body || &quot;&quot;, status, response_headers)
+        # end
         module_eval &lt;&lt;-EOE, __FILE__, __LINE__
           def #{method}(path, request_headers = {}, body = nil, status = 200, response_headers = {})
             @responses[Request.new(:#{method}, path, nil, request_headers)] = Response.new(body || &quot;&quot;, status, response_headers)
@@ -118,6 +121,11 @@ module ActiveResource
     end
 
     for method in [ :post, :put ]
+      # def post(path, body, headers)
+      #   request = ActiveResource::Request.new(:post, path, body, headers)
+      #   self.class.requests &lt;&lt; request
+      #   self.class.responses[request] || raise(InvalidRequestError.new(&quot;No response recorded for #{request}&quot;))
+      # end
       module_eval &lt;&lt;-EOE, __FILE__, __LINE__
         def #{method}(path, body, headers)
           request = ActiveResource::Request.new(:#{method}, path, body, headers)</diff>
      <filename>activeresource/lib/active_resource/http_mock.rb</filename>
    </modified>
    <modified>
      <diff>@@ -68,13 +68,13 @@ module ActiveSupport
 
     for severity in Severity.constants
       class_eval &lt;&lt;-EOT, __FILE__, __LINE__
-        def #{severity.downcase}(message = nil, progname = nil, &amp;block)
-          add(#{severity}, message, progname, &amp;block)
-        end
-
-        def #{severity.downcase}?
-          #{severity} &gt;= @level
-        end
+        def #{severity.downcase}(message = nil, progname = nil, &amp;block)  # def debug(message = nil, progname = nil, &amp;block)
+          add(#{severity}, message, progname, &amp;block)                    #   add(DEBUG, message, progname, &amp;block)
+        end                                                              # end
+                                                                         #
+        def #{severity.downcase}?                                        # def debug?
+          #{severity} &gt;= @level                                          #   DEBUG &gt;= @level
+        end                                                              # end
       EOT
     end
 </diff>
      <filename>activesupport/lib/active_support/buffered_logger.rb</filename>
    </modified>
    <modified>
      <diff>@@ -210,20 +210,24 @@ module ActiveSupport
       def define_callbacks(*callbacks)
         callbacks.each do |callback|
           class_eval &lt;&lt;-&quot;end_eval&quot;
-            def self.#{callback}(*methods, &amp;block)
-              callbacks = CallbackChain.build(:#{callback}, *methods, &amp;block)
-              (@#{callback}_callbacks ||= CallbackChain.new).concat callbacks
-            end
-
-            def self.#{callback}_callback_chain
-              @#{callback}_callbacks ||= CallbackChain.new
-
-              if superclass.respond_to?(:#{callback}_callback_chain)
-                CallbackChain.new(superclass.#{callback}_callback_chain + @#{callback}_callbacks)
-              else
-                @#{callback}_callbacks
-              end
-            end
+            def self.#{callback}(*methods, &amp;block)                             # def self.before_save(*methods, &amp;block)
+              callbacks = CallbackChain.build(:#{callback}, *methods, &amp;block)  #   callbacks = CallbackChain.build(:before_save, *methods, &amp;block)
+              @#{callback}_callbacks ||= CallbackChain.new                     #   @before_save_callbacks ||= CallbackChain.new
+              @#{callback}_callbacks.concat callbacks                          #   @before_save_callbacks.concat callbacks
+            end                                                                # end
+                                                                               #
+            def self.#{callback}_callback_chain                                # def self.before_save_callback_chain
+              @#{callback}_callbacks ||= CallbackChain.new                     #   @before_save_callbacks ||= CallbackChain.new
+                                                                               #
+              if superclass.respond_to?(:#{callback}_callback_chain)           #   if superclass.respond_to?(:before_save_callback_chain)
+                CallbackChain.new(                                             #     CallbackChain.new(
+                  superclass.#{callback}_callback_chain +                      #       superclass.before_save_callback_chain +
+                  @#{callback}_callbacks                                       #       @before_save_callbacks
+                )                                                              #     )
+              else                                                             #   else
+                @#{callback}_callbacks                                         #     @before_save_callbacks
+              end                                                              #   end
+            end                                                                # end
           end_eval
         end
       end</diff>
      <filename>activesupport/lib/active_support/callbacks.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,17 +11,17 @@ class Class
     syms.flatten.each do |sym|
       next if sym.is_a?(Hash)
       class_eval(&lt;&lt;-EOS, __FILE__, __LINE__)
-        unless defined? @@#{sym}
-          @@#{sym} = nil
-        end
-
-        def self.#{sym}
-          @@#{sym}
-        end
-
-        def #{sym}
-          @@#{sym}
-        end
+        unless defined? @@#{sym}  # unless defined? @@hair_colors
+          @@#{sym} = nil          #   @@hair_colors = nil
+        end                       # end
+                                  #
+        def self.#{sym}           # def self.hair_colors
+          @@#{sym}                #   @@hair_colors
+        end                       # end
+                                  #
+        def #{sym}                # def hair_colors
+          @@#{sym}                #   @@hair_colors
+        end                       # end
       EOS
     end
   end
@@ -30,19 +30,19 @@ class Class
     options = syms.extract_options!
     syms.flatten.each do |sym|
       class_eval(&lt;&lt;-EOS, __FILE__, __LINE__)
-        unless defined? @@#{sym}
-          @@#{sym} = nil
-        end
-
-        def self.#{sym}=(obj)
-          @@#{sym} = obj
-        end
-
-        #{&quot;
-        def #{sym}=(obj)
-          @@#{sym} = obj
-        end
-        &quot; unless options[:instance_writer] == false }
+        unless defined? @@#{sym}                       # unless defined? @@hair_colors
+          @@#{sym} = nil                               #   @@hair_colors = nil
+        end                                            # end
+                                                       #
+        def self.#{sym}=(obj)                          # def self.hair_colors=(obj)
+          @@#{sym} = obj                               #   @@hair_colors = obj
+        end                                            # end
+                                                       #
+        #{&quot;                                            #
+        def #{sym}=(obj)                               # def hair_colors=(obj)
+          @@#{sym} = obj                               #   @@hair_colors = obj
+        end                                            # end
+        &quot; unless options[:instance_writer] == false }  # # instance writer above is generated unless options[:instance_writer] == false
       EOS
     end
   end</diff>
      <filename>activesupport/lib/active_support/core_ext/class/attribute_accessors.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,22 +9,23 @@ class Class
     class_name_to_stop_searching_on = self.superclass.name.blank? ? &quot;Object&quot; : self.superclass.name
     names.each do |name|
       class_eval &lt;&lt;-EOS
-      def self.#{name}
-        if defined?(@#{name})
-          @#{name}
-        elsif superclass &lt; #{class_name_to_stop_searching_on} &amp;&amp; superclass.respond_to?(:#{name})
-          superclass.#{name}
-        end
-      end
-      def #{name}
-        self.class.#{name}
-      end
-      def self.#{name}?
-        !!#{name}
-      end
-      def #{name}?
-        !!#{name}
-      end
+      def self.#{name}                                            # def self.only_reader
+        if defined?(@#{name})                                     #   if defined?(@only_reader)
+          @#{name}                                                #     @only_reader
+        elsif superclass &lt; #{class_name_to_stop_searching_on} &amp;&amp;  #   elsif superclass &lt; Object &amp;&amp;
+              superclass.respond_to?(:#{name})                    #         superclass.respond_to?(:only_reader)
+          superclass.#{name}                                      #     superclass.only_reader
+        end                                                       #   end
+      end                                                         # end
+      def #{name}                                                 # def only_reader
+        self.class.#{name}                                        #   self.class.only_reader
+      end                                                         # end
+      def self.#{name}?                                           # def self.only_reader?
+        !!#{name}                                                 #   !!only_reader
+      end                                                         # end
+      def #{name}?                                                # def only_reader?
+        !!#{name}                                                 #   !!only_reader
+      end                                                         # end
       EOS
     end
   end
@@ -32,9 +33,9 @@ class Class
   def superclass_delegating_writer(*names)
     names.each do |name|
       class_eval &lt;&lt;-EOS
-        def self.#{name}=(value)
-          @#{name} = value
-        end
+        def self.#{name}=(value)  # def self.only_writer=(value)
+          @#{name} = value        #   @only_writer = value
+        end                       # end
       EOS
     end
   end</diff>
      <filename>activesupport/lib/active_support/core_ext/class/delegating_attributes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,13 +11,13 @@ class Class # :nodoc:
     syms.each do |sym|
       next if sym.is_a?(Hash)
       class_eval &lt;&lt;-EOS
-        def self.#{sym}
-          read_inheritable_attribute(:#{sym})
-        end
-
-        def #{sym}
-          self.class.#{sym}
-        end
+        def self.#{sym}                        # def self.before_add_for_comments
+          read_inheritable_attribute(:#{sym})  #   read_inheritable_attribute(:before_add_for_comments)
+        end                                    # end
+                                               #
+        def #{sym}                             # def before_add_for_comments
+          self.class.#{sym}                    #   self.class.before_add_for_comments
+        end                                    # end
       EOS
     end
   end
@@ -26,15 +26,15 @@ class Class # :nodoc:
     options = syms.extract_options!
     syms.each do |sym|
       class_eval &lt;&lt;-EOS
-        def self.#{sym}=(obj)
-          write_inheritable_attribute(:#{sym}, obj)
-        end
-
-        #{&quot;
-        def #{sym}=(obj)
-          self.class.#{sym} = obj
-        end
-        &quot; unless options[:instance_writer] == false }
+        def self.#{sym}=(obj)                          # def self.color=(obj)
+          write_inheritable_attribute(:#{sym}, obj)    #   write_inheritable_attribute(:color, obj)
+        end                                            # end
+                                                       #
+        #{&quot;                                            #
+        def #{sym}=(obj)                               # def color=(obj)
+          self.class.#{sym} = obj                      #   self.class.color = obj
+        end                                            # end
+        &quot; unless options[:instance_writer] == false }  # # the writer above is generated unless options[:instance_writer] == false
       EOS
     end
   end
@@ -43,15 +43,15 @@ class Class # :nodoc:
     options = syms.extract_options!
     syms.each do |sym|
       class_eval &lt;&lt;-EOS
-        def self.#{sym}=(obj)
-          write_inheritable_array(:#{sym}, obj)
-        end
-
-        #{&quot;
-        def #{sym}=(obj)
-          self.class.#{sym} = obj
-        end
-        &quot; unless options[:instance_writer] == false }
+        def self.#{sym}=(obj)                          # def self.levels=(obj)
+          write_inheritable_array(:#{sym}, obj)        #   write_inheritable_array(:levels, obj)
+        end                                            # end
+                                                       #
+        #{&quot;                                            #
+        def #{sym}=(obj)                               # def levels=(obj)
+          self.class.#{sym} = obj                      #   self.class.levels = obj
+        end                                            # end
+        &quot; unless options[:instance_writer] == false }  # # the writer above is generated unless options[:instance_writer] == false
       EOS
     end
   end
@@ -60,15 +60,15 @@ class Class # :nodoc:
     options = syms.extract_options!
     syms.each do |sym|
       class_eval &lt;&lt;-EOS
-        def self.#{sym}=(obj)
-          write_inheritable_hash(:#{sym}, obj)
-        end
-
-        #{&quot;
-        def #{sym}=(obj)
-          self.class.#{sym} = obj
-        end
-        &quot; unless options[:instance_writer] == false }
+        def self.#{sym}=(obj)                          # def self.nicknames=(obj)
+          write_inheritable_hash(:#{sym}, obj)         #   write_inheritable_hash(:nicknames, obj)
+        end                                            # end
+                                                       #
+        #{&quot;                                            #
+        def #{sym}=(obj)                               # def nicknames=(obj)
+          self.class.#{sym} = obj                      #   self.class.nicknames = obj
+        end                                            # end
+        &quot; unless options[:instance_writer] == false }  # # the writer above is generated unless options[:instance_writer] == false
       EOS
     end
   end</diff>
      <filename>activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,12 +3,12 @@
 class Logger
   def self.define_around_helper(level)
     module_eval &lt;&lt;-end_eval
-      def around_#{level}(before_message, after_message, &amp;block)
-        self.#{level}(before_message)
-        return_value = block.call(self)
-        self.#{level}(after_message)
-        return return_value
-      end
+      def around_#{level}(before_message, after_message, &amp;block)  # def around_debug(before_message, after_message, &amp;block)
+        self.#{level}(before_message)                             #   self.debug(before_message)
+        return_value = block.call(self)                           #   return_value = block.call(self)
+        self.#{level}(after_message)                              #   self.debug(after_message)
+        return return_value                                       #   return return_value
+      end                                                         # end
     end_eval
   end
   [:debug, :info, :error, :fatal].each {|level| define_around_helper(level) }</diff>
      <filename>activesupport/lib/active_support/core_ext/logger.rb</filename>
    </modified>
    <modified>
      <diff>@@ -64,9 +64,9 @@ module ActiveSupport
       #   e.title    # =&gt; &quot;Megastars&quot;
       def alias_attribute(new_name, old_name)
         module_eval &lt;&lt;-STR, __FILE__, __LINE__+1
-          def #{new_name}; self.#{old_name}; end
-          def #{new_name}?; self.#{old_name}?; end
-          def #{new_name}=(v); self.#{old_name} = v; end
+          def #{new_name}; self.#{old_name}; end          # def subject; self.title; end
+          def #{new_name}?; self.#{old_name}?; end        # def subject?; self.title?; end
+          def #{new_name}=(v); self.#{old_name} = v; end  # def subject=(v); self.title = v; end
         STR
       end
     end</diff>
      <filename>activesupport/lib/active_support/core_ext/module/aliasing.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,10 +22,10 @@ class Module
     raise 'Default value or block required' unless !default.nil? || block
     define_method(sym, block_given? ? block : Proc.new { default })
     module_eval(&lt;&lt;-EVAL, __FILE__, __LINE__)
-      def #{sym}=(value)
-        class &lt;&lt; self; attr_reader :#{sym} end
-        @#{sym} = value
-      end
+      def #{sym}=(value)                        # def age=(value)
+        class &lt;&lt; self; attr_reader :#{sym} end  #   class &lt;&lt; self; attr_reader :age end
+        @#{sym} = value                         #   @age = value
+      end                                       # end
     EVAL
   end
 end</diff>
      <filename>activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,17 +15,17 @@ class Module
     syms.each do |sym|
       next if sym.is_a?(Hash)
       class_eval(&lt;&lt;-EOS, __FILE__, __LINE__)
-        unless defined? @@#{sym}
-          @@#{sym} = nil
-        end
-        
-        def self.#{sym}
-          @@#{sym}
-        end
-
-        def #{sym}
-          @@#{sym}
-        end
+        unless defined? @@#{sym}  # unless defined? @@pagination_options
+          @@#{sym} = nil          #   @@pagination_options = nil
+        end                       # end
+                                  #
+        def self.#{sym}           # def self.pagination_options
+          @@#{sym}                #   @@pagination_options
+        end                       # end
+                                  #
+        def #{sym}                # def pagination_options
+          @@#{sym}                #   @@pagination_options
+        end                       # end
       EOS
     end
   end
@@ -34,19 +34,19 @@ class Module
     options = syms.extract_options!
     syms.each do |sym|
       class_eval(&lt;&lt;-EOS, __FILE__, __LINE__)
-        unless defined? @@#{sym}
-          @@#{sym} = nil
-        end
-        
-        def self.#{sym}=(obj)
-          @@#{sym} = obj
-        end
-        
-        #{&quot;
-        def #{sym}=(obj)
-          @@#{sym} = obj
-        end
-        &quot; unless options[:instance_writer] == false }
+        unless defined? @@#{sym}                       # unless defined? @@pagination_options
+          @@#{sym} = nil                               #   @@pagination_options = nil
+        end                                            # end
+                                                       #
+        def self.#{sym}=(obj)                          # def self.pagination_options=(obj)
+          @@#{sym} = obj                               #   @@pagination_options = obj
+        end                                            # end
+                                                       #
+        #{&quot;                                            #
+        def #{sym}=(obj)                               # def pagination_options=(obj)
+          @@#{sym} = obj                               #   @@pagination_options = obj
+        end                                            # end
+        &quot; unless options[:instance_writer] == false }  # # instance writer above is generated unless options[:instance_writer] == false
       EOS
     end
   end</diff>
      <filename>activesupport/lib/active_support/core_ext/module/attribute_accessors.rb</filename>
    </modified>
    <modified>
      <diff>@@ -112,9 +112,9 @@ class Module
 
     methods.each do |method|
       module_eval(&lt;&lt;-EOS, &quot;(__DELEGATION__)&quot;, 1)
-        def #{prefix}#{method}(*args, &amp;block)
-          #{allow_nil}#{to}.__send__(#{method.inspect}, *args, &amp;block)
-        end
+        def #{prefix}#{method}(*args, &amp;block)                           # def customer_name(*args, &amp;block)
+          #{allow_nil}#{to}.__send__(#{method.inspect}, *args, &amp;block)  #   client &amp;&amp; client.__send__(:name, *args, &amp;block)
+        end                                                             # end
       EOS
     end
   end</diff>
      <filename>activesupport/lib/active_support/core_ext/module/delegation.rb</filename>
    </modified>
    <modified>
      <diff>@@ -26,11 +26,11 @@ class Module
       end
 
       module_eval(&lt;&lt;-EOS, __FILE__, __LINE__)
-        def #{aliased_method}_with_synchronization#{punctuation}(*args, &amp;block)
-          #{with}.synchronize do
-            #{aliased_method}_without_synchronization#{punctuation}(*args, &amp;block)
-          end
-        end
+        def #{aliased_method}_with_synchronization#{punctuation}(*args, &amp;block)     # def expire_with_synchronization(*args, &amp;block)
+          #{with}.synchronize do                                                    #   @@lock.synchronize do
+            #{aliased_method}_without_synchronization#{punctuation}(*args, &amp;block)  #     expire_without_synchronization(*args, &amp;block)
+          end                                                                       #   end
+        end                                                                         # end
       EOS
 
       alias_method_chain method, :synchronization</diff>
      <filename>activesupport/lib/active_support/core_ext/module/synchronization.rb</filename>
    </modified>
    <modified>
      <diff>@@ -90,10 +90,15 @@ module ActiveSupport
         method_names.each do |method_name|
           alias_method_chain(method_name, :deprecation) do |target, punctuation|
             class_eval(&lt;&lt;-EOS, __FILE__, __LINE__)
-              def #{target}_with_deprecation#{punctuation}(*args, &amp;block)
-                ::ActiveSupport::Deprecation.warn(self.class.deprecated_method_warning(:#{method_name}, #{options[method_name].inspect}), caller)
-                #{target}_without_deprecation#{punctuation}(*args, &amp;block)
-              end
+              def #{target}_with_deprecation#{punctuation}(*args, &amp;block)   # def generate_secret_with_deprecation(*args, &amp;block)
+                ::ActiveSupport::Deprecation.warn(                          #   ::ActiveSupport::Deprecation.warn(
+                  self.class.deprecated_method_warning(                     #     self.class.deprecated_method_warning(
+                    :#{method_name},                                        #       :generate_secret,
+                    #{options[method_name].inspect}),                       #       &quot;You should use ActiveSupport::SecureRandom.hex(64)&quot;),
+                  caller                                                    #     caller
+                )                                                           #   )
+                #{target}_without_deprecation#{punctuation}(*args, &amp;block)  #   generate_secret_without_deprecation(*args, &amp;block)
+              end                                                           # end
             EOS
           end
         end</diff>
      <filename>activesupport/lib/active_support/deprecation.rb</filename>
    </modified>
    <modified>
      <diff>@@ -59,34 +59,36 @@ module ActiveSupport
         memoized_ivar = ActiveSupport::Memoizable.memoized_ivar_for(symbol)
 
         class_eval &lt;&lt;-EOS, __FILE__, __LINE__
-          include InstanceMethods
-
-          raise &quot;Already memoized #{symbol}&quot; if method_defined?(:#{original_method})
-          alias #{original_method} #{symbol}
-
-          if instance_method(:#{symbol}).arity == 0
-            def #{symbol}(reload = false)
-              if reload || !defined?(#{memoized_ivar}) || #{memoized_ivar}.empty?
-                #{memoized_ivar} = [#{original_method}.freeze]
-              end
-              #{memoized_ivar}[0]
-            end
-          else
-            def #{symbol}(*args)
-              #{memoized_ivar} ||= {} unless frozen?
-              reload = args.pop if args.last == true || args.last == :reload
-
-              if defined?(#{memoized_ivar}) &amp;&amp; #{memoized_ivar}
-                if !reload &amp;&amp; #{memoized_ivar}.has_key?(args)
-                  #{memoized_ivar}[args]
-                elsif #{memoized_ivar}
-                  #{memoized_ivar}[args] = #{original_method}(*args).freeze
-                end
-              else
-                #{original_method}(*args)
-              end
-            end
-          end
+          include InstanceMethods                                                  # include InstanceMethods
+                                                                                   #
+          if method_defined?(:#{original_method})                                  # if method_defined?(:_unmemoized_mime_type)
+            raise &quot;Already memoized #{symbol}&quot;                                     #   raise &quot;Already memoized mime_type&quot;
+          end                                                                      # end
+          alias #{original_method} #{symbol}                                       # alias _unmemoized_mime_type mime_type
+                                                                                   #
+          if instance_method(:#{symbol}).arity == 0                                # if instance_method(:mime_type).arity == 0
+            def #{symbol}(reload = false)                                          #   def mime_type(reload = false)
+              if reload || !defined?(#{memoized_ivar}) || #{memoized_ivar}.empty?  #     if reload || !defined?(@_memoized_mime_type) || @_memoized_mime_type.empty?
+                #{memoized_ivar} = [#{original_method}.freeze]                     #       @_memoized_mime_type = [_unmemoized_mime_type.freeze]
+              end                                                                  #     end
+              #{memoized_ivar}[0]                                                  #     @_memoized_mime_type[0]
+            end                                                                    #   end
+          else                                                                     # else
+            def #{symbol}(*args)                                                   #   def mime_type(*args)
+              #{memoized_ivar} ||= {} unless frozen?                               #     @_memoized_mime_type ||= {} unless frozen?
+              reload = args.pop if args.last == true || args.last == :reload       #     reload = args.pop if args.last == true || args.last == :reload
+                                                                                   #
+              if defined?(#{memoized_ivar}) &amp;&amp; #{memoized_ivar}                    #     if defined?(@_memoized_mime_type) &amp;&amp; @_memoized_mime_type
+                if !reload &amp;&amp; #{memoized_ivar}.has_key?(args)                      #       if !reload &amp;&amp; @_memoized_mime_type.has_key?(args)
+                  #{memoized_ivar}[args]                                           #         @_memoized_mime_type[args]
+                elsif #{memoized_ivar}                                             #       elsif @_memoized_mime_type
+                  #{memoized_ivar}[args] = #{original_method}(*args).freeze        #         @_memoized_mime_type[args] = _unmemoized_mime_type(*args).freeze
+                end                                                                #       end
+              else                                                                 #     else
+                #{original_method}(*args)                                          #       _unmemoized_mime_type(*args)
+              end                                                                  #     end
+            end                                                                    #   end
+          end                                                                      # end
         EOS
       end
     end</diff>
      <filename>activesupport/lib/active_support/memoizable.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,10 +24,10 @@ module ActiveSupport #:nodoc:
       # Lazy load the Unicode database so it's only loaded when it's actually used
       ATTRIBUTES.each do |attr_name|
         class_eval(&lt;&lt;-EOS, __FILE__, __LINE__)
-          def #{attr_name}
-            load
-            @#{attr_name}
-          end
+          def #{attr_name}  # def codepoints
+            load            #   load
+            @#{attr_name}   #   @codepoints
+          end               # end
         EOS
       end
 </diff>
      <filename>activesupport/lib/active_support/multibyte/unicode_database.rb</filename>
    </modified>
    <modified>
      <diff>@@ -234,9 +234,9 @@ module ActiveSupport
 
     %w(year mon month day mday wday yday hour min sec to_date).each do |method_name|
       class_eval &lt;&lt;-EOV
-        def #{method_name}
-          time.#{method_name}
-        end
+        def #{method_name}     # def year
+          time.#{method_name}  #   time.year
+        end                    # end
       EOV
     end
 </diff>
      <filename>activesupport/lib/active_support/time_with_zone.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1fb275541a58e6a2100261c6117e96e6c014cc6c</id>
    </parent>
  </parents>
  <author>
    <name>Xavier Noria</name>
    <login>fxn</login>
    <email>fxn@hashref.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/a2270ef2594b97891994848138614657363f2806</url>
  <id>a2270ef2594b97891994848138614657363f2806</id>
  <committed-date>2008-12-28T11:49:28-08:00</committed-date>
  <authored-date>2008-12-28T11:48:05-08:00</authored-date>
  <message>Inline code comments for class_eval/module_eval [#1657 state:resolved]

Signed-off-by: Pratik Naik &lt;pratiknaik@gmail.com&gt;</message>
  <tree>29962a36c4eb70272df2665db2b28d5b3ad15b99</tree>
  <committer>
    <name>Pratik Naik</name>
    <login>lifo</login>
    <email>pratiknaik@gmail.com</email>
  </committer>
</commit>
