From cbad8857bd40b3a0fa36a2978c64202bcd0625b2 Mon Sep 17 00:00:00 2001 From: dctabuyz Date: Wed, 7 Jan 2015 12:34:27 +0500 Subject: [PATCH] use actual ruby interpreter --- spec/wpscan_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/wpscan_spec.rb b/spec/wpscan_spec.rb index e2de8712..85d8f12f 100644 --- a/spec/wpscan_spec.rb +++ b/spec/wpscan_spec.rb @@ -5,14 +5,14 @@ require 'spec_helper' describe 'wpscan main checks' do it 'should check for errors on running the mainscript' do - a = %x[ruby #{ROOT_DIR}/wpscan.rb] + a = %x[#{RbConfig.ruby} #{ROOT_DIR}/wpscan.rb] expect(a).to match /No argument supplied/ end it 'should check for valid syntax' do result = "" Dir.glob("**/*.rb") do |file| - res = %x{ruby -c #{ROOT_DIR}/#{file} 2>&1}.split("\n") + res = %x{#{RbConfig.ruby} -c #{ROOT_DIR}/#{file} 2>&1}.split("\n") ok = res.select {|msg| msg =~ /Syntax OK/} result << ("####################\nSyntax error in #{file}:\n#{res.join("\n").strip()}\n") if ok.size != 1 end