From 18a81db6fca2994d2c3872b0cb6bfa78bb94b383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Silva?= Date: Fri, 25 Mar 2011 02:46:57 +0000 Subject: check whether the user is using a supported ruby interpreter for benchmarking --- activesupport/lib/active_support/testing/performance.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/testing') 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 -- cgit v1.2.3