From 239f5606308a6ba11c6a591694eadc7920d4c4d1 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sun, 18 May 2014 12:00:03 -0700 Subject: Feature detect based on Ruby version. I didn't want to do this, FNM_EXTGLOB is defined on 2.1.x, but Dir.glob returns the wrong value on Ruby less than 2.2.0. Checking for a case-insensitive FS seems too hard, so just check Ruby version Checking for a case-insensitive FS seems too hard, so just check Ruby version. --- actionview/lib/action_view/template/resolver.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionview') diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index 189086132e..d29d020c17 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -196,7 +196,7 @@ module ActionView } end - if File.const_defined? :FNM_EXTGLOB + if RUBY_VERSION >= '2.2.0' def find_template_paths(query) Dir[query].reject { |filename| File.directory?(filename) || -- cgit v1.2.3