mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix called_from under Windows so engines works properly
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
7189e3c881
commit
1477a6101d
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ module Rails
|
|||
def inherited(base)
|
||||
unless abstract_railtie?(base)
|
||||
base.called_from = begin
|
||||
call_stack = caller.map { |p| p.split(':').first }
|
||||
call_stack = caller.map { |p| p.split(':')[0..-2].join(':') }
|
||||
File.dirname(call_stack.detect { |p| p !~ %r[railties[\w\-]*/lib/rails|rack[\w\-]*/lib/rack] })
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue