aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-18 12:00:03 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-05-18 12:00:12 -0700
commit239f5606308a6ba11c6a591694eadc7920d4c4d1 (patch)
tree10fa48f88bdca5507601c764fac776a24cd2fe70 /actionview
parent623da132561e8a2441756adcac9e80815c17f27f (diff)
downloadrails-239f5606308a6ba11c6a591694eadc7920d4c4d1.tar.gz
rails-239f5606308a6ba11c6a591694eadc7920d4c4d1.tar.bz2
rails-239f5606308a6ba11c6a591694eadc7920d4c4d1.zip
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.
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/template/resolver.rb2
1 files changed, 1 insertions, 1 deletions
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) ||