<commit_before>module ActionController
  module UrlFor
    extend ActiveSupport::Concern

    include AbstractController::UrlFor

    def url_options
      @_url_options ||= begin
        options = {}
        if _routes.equal?(env["action_dispatch.routes"])
          options[:script_name] = request.script_name.dup
        end

        super.merge(options).reverse_merge(
          :host => request.host_with_port,
          :protocol => request.protocol,
          :_path_segments => request.symbolized_path_parameters
        ).freeze
      end
    end
  end
end<commit_msg>Do not cache the script name outcome.<commit_after>module ActionController
  module UrlFor
    extend ActiveSupport::Concern

    include AbstractController::UrlFor

    def url_options
      @_url_options ||= super.reverse_merge(
        :host => request.host_with_port,
        :protocol => request.protocol,
        :_path_segments => request.symbolized_path_parameters
      ).freeze

      if _routes.equal?(env["action_dispatch.routes"])
        @_url_options.dup.tap do |options|
          options[:script_name] = request.script_name.dup
          options.freeze
        end
      else
        @_url_options
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08367514356029532, 'fraction_numerical': 0.0, 'mean_word_length': 2.588235294117647, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7652930', 'n_tokens_mistral': 347, 'n_tokens_neox': 341, 'n_words': 69}