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.
This commit is contained in:
Aaron Patterson 2014-05-18 12:00:03 -07:00
parent 623da13256
commit 239f560630
1 changed files with 1 additions and 1 deletions

View File

@ -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) ||