aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
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:57 -0700
commit6a051299f98ee43864326c6c0a4f7d169d22b3f8 (patch)
tree6a6ef0ce16a71ff12ad7289d3c72cf0cc24d62df /actionpack
parentc40df470556646a90a9070a077f19f8e520304f4 (diff)
downloadrails-6a051299f98ee43864326c6c0a4f7d169d22b3f8.tar.gz
rails-6a051299f98ee43864326c6c0a4f7d169d22b3f8.tar.bz2
rails-6a051299f98ee43864326c6c0a4f7d169d22b3f8.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 'actionpack')
-rw-r--r--actionpack/lib/action_view/template/resolver.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb
index 27d11ab6fb..47ea8a3c9b 100644
--- a/actionpack/lib/action_view/template/resolver.rb
+++ b/actionpack/lib/action_view/template/resolver.rb
@@ -133,7 +133,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) ||