diff options
Diffstat (limited to 'tools/profile')
-rwxr-xr-x | tools/profile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/profile b/tools/profile index a35dd18b77..eb7fc7792b 100755 --- a/tools/profile +++ b/tools/profile @@ -1,4 +1,7 @@ #!/usr/bin/env ruby +# Profile require calls giving information about the time and the files that are called +# when loading the provided file. +# # Example: # tools/profile activesupport/lib/active_support.rb [ruby-prof mode] [ruby-prof printer] ENV['NO_RELOAD'] ||= '1' @@ -65,7 +68,7 @@ module CodeTools private def assert_ruby_file_exists(path) - fail Error.new("No such file") unless File.exists?(path) + fail Error.new("No such file") unless File.exist?(path) fail Error.new("#{path} is a directory") if File.directory?(path) ruby_extension = File.extname(path) == '.rb' ruby_executable = File.open(path, 'rb') {|f| f.readline } =~ [/\A#!.*ruby/] |