Sha256: c536591c73f1267319b6c417bfd31f184412280bbef2888f4ee02a5c8201544f

Contents?: true

Size: 573 Bytes

Versions: 80

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

80 entries across 77 versions & 8 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/actionview-7.1.3.4/lib/action_view/template/inline.rb
actionview-8.0.1 lib/action_view/template/inline.rb
actionview-8.0.0.1 lib/action_view/template/inline.rb
actionview-7.2.2.1 lib/action_view/template/inline.rb
actionview-7.1.5.1 lib/action_view/template/inline.rb
actionview-7.0.8.7 lib/action_view/template/inline.rb
actionview-8.0.0 lib/action_view/template/inline.rb
actionview-7.2.2 lib/action_view/template/inline.rb
actionview-7.1.5 lib/action_view/template/inline.rb
actionview-8.0.0.rc2 lib/action_view/template/inline.rb
actionview-7.2.1.2 lib/action_view/template/inline.rb
actionview-7.1.4.2 lib/action_view/template/inline.rb
actionview-7.0.8.6 lib/action_view/template/inline.rb
actionview-8.0.0.rc1 lib/action_view/template/inline.rb
actionview-7.2.1.1 lib/action_view/template/inline.rb
actionview-7.1.4.1 lib/action_view/template/inline.rb
actionview-7.0.8.5 lib/action_view/template/inline.rb
actionview-8.0.0.beta1 lib/action_view/template/inline.rb
omg-actionview-8.0.0.alpha9 lib/action_view/template/inline.rb
omg-actionview-8.0.0.alpha8 lib/action_view/template/inline.rb