Skip to content
This repository
Browse code

check whether the user is using a supported ruby interpreter for benc…

…hmarking
  • Loading branch information...
commit 18a81db6fca2994d2c3872b0cb6bfa78bb94b383 1 parent 1151608
Gonçalo Silva authored March 25, 2011
8  activesupport/lib/active_support/testing/performance.rb
@@ -271,4 +271,10 @@ def measure; end
271 271
   end
272 272
 end
273 273
 
274  
-require 'active_support/testing/performance/mri'
  274
+RUBY_ENGINE ||= "ruby"
  275
+case RUBY_ENGINE
  276
+  when "ruby" then require 'active_support/testing/performance/mri'
  277
+  else
  278
+    $stderr.puts "Your ruby interpreter is not supported for benchmarking."
  279
+    exit
  280
+end

0 notes on commit 18a81db

Please sign in to comment.
Something went wrong with that request. Please try again.