spec/watirspec/lib/watirspec.rb in watir-webdriver-0.1.2 vs spec/watirspec/lib/watirspec.rb in watir-webdriver-0.1.3
- old
+ new
@@ -56,22 +56,20 @@
args = WatirSpec.implementation.browser_args
args ? klass.new(*args) : klass.new
end
def ruby
- if @ruby.nil?
+ @ruby ||= (
if defined?(Gem)
- @ruby = Gem.ruby
+ Gem.ruby
else
require "rbconfig"
rb = File.join(RbConfig::CONFIG.values_at('BINDIR', 'RUBY_INSTALL_NAME').compact)
ext = RbConfig::CONFIG['EXEEXT']
- @ruby = "#{rb}#{ext}"
+ "#{rb}#{ext}"
end
- end
-
- @ruby
+ )
end
end # class << WatirSpec
end # WatirSpec