Sha256: c536591c73f1267319b6c417bfd31f184412280bbef2888f4ee02a5c8201544f

Contents?: true

Size: 573 Bytes

Versions: 81

Compression:

Stored size: 573 Bytes

Contents

# frozen_string_literal: true

module ActionView # :nodoc:
  class Template # :nodoc:
    class Inline < Template # :nodoc:
      # This finalizer is needed (and exactly with a proc inside another proc)
      # otherwise templates leak in development.
      Finalizer = proc do |method_name, mod| # :nodoc:
        proc do
          mod.module_eval do
            remove_possible_method method_name
          end
        end
      end

      def compile(mod)
        super
        ObjectSpace.define_finalizer(self, Finalizer[method_name, mod])
      end
    end
  end
end

Version data entries

81 entries across 78 versions & 9 rubygems

Version Path
omg-actionview-8.0.0.alpha8 lib/action_view/template/inline.rb
omg-actionview-8.0.0.alpha7 lib/action_view/template/inline.rb
omg-actionview-8.0.0.alpha4 lib/action_view/template/inline.rb
omg-actionview-8.0.0.alpha3 lib/action_view/template/inline.rb
omg-actionview-8.0.0.alpha2 lib/action_view/template/inline.rb
omg-actionview-8.0.0.alpha1 lib/action_view/template/inline.rb
actionview-7.1.4 lib/action_view/template/inline.rb
actionview-7.2.1 lib/action_view/template/inline.rb
actionview-7.2.0 lib/action_view/template/inline.rb
actionview-7.2.0.rc1 lib/action_view/template/inline.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/actionview-7.1.3.4/lib/action_view/template/inline.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/actionview-7.0.8.4/lib/action_view/template/inline.rb
actionview-7.2.0.beta3 lib/action_view/template/inline.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/actionview-7.0.5.1/lib/action_view/template/inline.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/actionview-7.0.5.1/lib/action_view/template/inline.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/actionview-7.0.5.1/lib/action_view/template/inline.rb
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/actionview-7.1.3.4/lib/action_view/template/inline.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/actionview-7.1.3.4/lib/action_view/template/inline.rb
actionview-7.2.0.beta2 lib/action_view/template/inline.rb
actionview-7.1.3.4 lib/action_view/template/inline.rb