aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing/performance.rb
diff options
context:
space:
mode:
authorGonçalo Silva <goncalossilva@gmail.com>2011-03-25 02:46:57 +0000
committerGonçalo Silva <goncalossilva@gmail.com>2011-03-25 02:46:57 +0000
commit18a81db6fca2994d2c3872b0cb6bfa78bb94b383 (patch)
tree7af6e7e8731fe24f491b954740c2a4657c7aa3de /activesupport/lib/active_support/testing/performance.rb
parent11516089212a67e154ec426787feb6f24ed7e129 (diff)
downloadrails-18a81db6fca2994d2c3872b0cb6bfa78bb94b383.tar.gz
rails-18a81db6fca2994d2c3872b0cb6bfa78bb94b383.tar.bz2
rails-18a81db6fca2994d2c3872b0cb6bfa78bb94b383.zip
check whether the user is using a supported ruby interpreter for benchmarking
Diffstat (limited to 'activesupport/lib/active_support/testing/performance.rb')
-rw-r--r--activesupport/lib/active_support/testing/performance.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb
index 0d7d405127..351835553f 100644
--- a/activesupport/lib/active_support/testing/performance.rb
+++ b/activesupport/lib/active_support/testing/performance.rb
@@ -271,4 +271,10 @@ module ActiveSupport
end
end
-require 'active_support/testing/performance/mri'
+RUBY_ENGINE ||= "ruby"
+case RUBY_ENGINE
+ when "ruby" then require 'active_support/testing/performance/mri'
+ else
+ $stderr.puts "Your ruby interpreter is not supported for benchmarking."
+ exit
+end