Skip to content
Browse files

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.
  • Loading branch information...
1 parent b4a2c96 commit 52ecae4e79858063aba51885594409fcce2f38cc @tenderlove tenderlove committed May 18, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_view/template/resolver.rb
View
2 actionpack/lib/action_view/template/resolver.rb
@@ -193,7 +193,7 @@ def query(path, details, formats)
}
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) ||

0 comments on commit 52ecae4

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