1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionview/lib/action_view
Guilherme Mansur 526a5eb10c Empty array instead of nil for source_extract
The source_extract method will return nil when it can't find the file name in
the backtrace, methods that consume this method expect an array and the nil ends
up causing type errors down the road like it happened here: #36341. This
patch refactors the source_extract method so that it returns an empty
array instead of nil when it can't find the source code.

Co-authored-by: Kasper Timm Hansen <kaspth@gmail.com>
2019-07-14 15:04:25 -04:00
..
helpers A type class or nil has to respond_to :to_s 2019-07-12 18:33:31 +09:00
locale
renderer Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
tasks
template Empty array instead of nil for source_extract 2019-07-14 15:04:25 -04:00
testing Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
base.rb active_support/deprecation has to be already required via active_support/rails.rb 2019-07-12 18:34:07 +09:00
buffers.rb [ci skip] Doc ActionView::OutputBuffer 2018-09-06 15:28:45 -05:00
cache_expiry.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
context.rb Directly include "CompiledTemplates" module 2019-01-18 15:51:15 -08:00
dependency_tracker.rb
digestor.rb Only clear template caches in dev after changes (#35629) 2019-04-01 21:22:57 +02:00
flows.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
gem_version.rb Start Rails 6.1 development 2019-04-24 15:57:14 -04:00
helpers.rb
layouts.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
log_subscriber.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
lookup_context.rb active_support/deprecation has to be already required via active_support/rails.rb 2019-07-12 18:34:07 +09:00
model_naming.rb
path_set.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
railtie.rb Only clear template caches in dev after changes (#35629) 2019-04-01 21:22:57 +02:00
record_identifier.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
rendering.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
routing_url_for.rb respect path_only option when an array is passed into url_for 2018-10-01 19:31:08 +02:00
template.rb active_support/deprecation has to be already required via active_support/rails.rb 2019-07-12 18:34:07 +09:00
test_case.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
unbound_template.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
version.rb
view_paths.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00