lib/ehcache/cache_manager.rb in jruby-ehcache-rails2-1.3.0 vs lib/ehcache/cache_manager.rb in jruby-ehcache-rails2-1.3.1
- old
+ new
@@ -51,12 +51,12 @@
# CacheManager.create and CacheManager#initialize.
def process_init_args(*args)
args.compact!
if args.empty?
# First, look relative to the file that is creating the CacheManager.
- # The expression caller[2] finds the entry in the call stack where
+ # The expression caller[1] finds the entry in the call stack where
# CacheManager.new or CacheManager.create was called.
- creator = /^(.+?):\d/.match(caller[2])[1]
+ creator = /^\s*(.+?):\d/.match(caller[1])[1]
if ehcache_config = Java::NetSfEhcacheConfig::Configuration.find(File.dirname(creator))
yield(ehcache_config)
else
yield
end