aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/testing/performance.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb
index 9e46e5963e..fe68428a8a 100644
--- a/activesupport/lib/active_support/testing/performance.rb
+++ b/activesupport/lib/active_support/testing/performance.rb
@@ -3,11 +3,13 @@ require 'rails/version'
require 'active_support/core_ext/class/delegating_attributes'
require 'active_support/core_ext/string/inflections'
-begin
- require 'ruby-prof'
-rescue LoadError
- $stderr.puts "Specify ruby-prof as application's dependency in Gemfile to run benchmarks."
- exit
+if !defined?(RUBY_ENGINE) or RUBY_ENGINE == "ruby" # MRI 1.8 or 1.9
+ begin
+ require 'ruby-prof'
+ rescue LoadError
+ $stderr.puts "Specify ruby-prof as application's dependency in Gemfile to run benchmarks."
+ exit
+ end
end
module ActiveSupport