diff options
Diffstat (limited to 'railties/lib/rails/engine.rb')
-rw-r--r-- | railties/lib/rails/engine.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 46f1d38b96..b4c0028b1f 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -362,7 +362,7 @@ module Rails base.called_from = begin call_stack = caller_locations.map { |l| l.absolute_path || l.path } - File.dirname(call_stack.detect { |p| p !~ %r[railties[\w.-]*/lib/rails|rack[\w.-]*/lib/rack] }) + File.dirname(call_stack.detect { |p| !p.match?(%r[railties[\w.-]*/lib/rails|rack[\w.-]*/lib/rack]) }) end end |