mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #41369 from aweglteo/remove-check-defined-bind_call
Remove check for UnboundMethod#method_defined? bind_call
This commit is contained in:
commit
25af5e9ff8
1 changed files with 2 additions and 8 deletions
|
@ -53,13 +53,7 @@ class NameError
|
|||
UNBOUND_METHOD_MODULE_NAME = Module.instance_method(:name)
|
||||
private_constant :UNBOUND_METHOD_MODULE_NAME
|
||||
|
||||
if UnboundMethod.method_defined?(:bind_call)
|
||||
def real_mod_name(mod)
|
||||
UNBOUND_METHOD_MODULE_NAME.bind_call(mod)
|
||||
end
|
||||
else
|
||||
def real_mod_name(mod)
|
||||
UNBOUND_METHOD_MODULE_NAME.bind(mod).call
|
||||
end
|
||||
def real_mod_name(mod)
|
||||
UNBOUND_METHOD_MODULE_NAME.bind_call(mod)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue