rails/rails — pull request #12412 by bf4 (2013-09-30 20:27:42+00:00)
Title: Allow Pathname for require dependency

For background see #12411 and [rubyonrails-core discussion](https://groups.google.com/d/msg/rubyonrails-core/ESAONvNYZL4/2nArYViw8JQJ)

Example use case

```ruby
require_dependency Rails.root.join('lib','null_logger')
# raises exception
# ArgumentError: the file name must be a String -- you passed #
```
I would argue `require_dependency` should also accept a pathname, just like `require` does.

I think that `require_dependency Rails.root.join('lib','null_logger').to_s` is a workaround proves this point

[underlying Rails code](https://github.com/rails/rails/blob/master/activesupport/lib/active_support/dependencies.rb#L201)

```ruby
def require_dependency(file_name, message = "No such file to load -- %s")
unless file_name.is_a?(String)
raise ArgumentError, "the file name must be a String -- you passed #{file_name.inspect}"
end

Dependencies.depend_on(file_name, message)
end
```