define_javascript_functions (ActionView::Helpers::JavaScriptHelper)

    # File lib/action_view/helpers/javascript_helper.rb, line 84
          def define_javascript_functions
            javascript = '<script type="text/javascript">'

            # load prototype.js and its extensions first
            prototype_libs = Dir.glob(File.join(JAVASCRIPT_PATH, 'prototype*')).sort.reverse
            prototype_libs.each do |filename|
              javascript << "\n" << IO.read(filename)
            end

            # load other librairies
            (Dir.glob(File.join(JAVASCRIPT_PATH, '*')) - prototype_libs).each do |filename|
              javascript << "\n" << IO.read(filename)
            end
            javascript << '</script>'
          end