From 7ebef567ce30d848dd8f9374fd70699fd91acb29 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Mon, 25 Jul 2016 00:31:35 +0200 Subject: systematic revision of =~ usage in AV Where appropriate, prefer the more concise Regexp#match?, String#include?, String#start_with?, or String#end_with? --- actionview/test/actionpack/controller/layout_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionview/test/actionpack/controller/layout_test.rb') diff --git a/actionview/test/actionpack/controller/layout_test.rb b/actionview/test/actionpack/controller/layout_test.rb index 64bc4c41d6..ecfef3dc8c 100644 --- a/actionview/test/actionpack/controller/layout_test.rb +++ b/actionview/test/actionpack/controller/layout_test.rb @@ -1,5 +1,6 @@ require 'abstract_unit' require 'active_support/core_ext/array/extract_options' +require 'active_support/core_ext/regexp' # The view_paths array must be set on Base and not LayoutTest so that LayoutTest's inherited # method has access to the view_paths array when looking for a layout to automatically assign. @@ -252,7 +253,7 @@ class LayoutStatusIsRenderedTest < ActionController::TestCase end end -unless RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ +unless /mswin|mingw/.match?(RbConfig::CONFIG['host_os']) class LayoutSymlinkedTest < LayoutTest layout "symlinked/symlinked_layout" end -- cgit v1.2.3