зеркало из https://github.com/github/ruby.git
[ruby/pp] Incorporate 2.6 versions of 2.7 methods needed
* UnboundMethod#bind_call * ruby2_keywords gem for testing https://github.com/ruby/pp/commit/721d8cbd10
This commit is contained in:
Родитель
73da1c5ea3
Коммит
cc73dfb92a
|
@ -3,6 +3,16 @@
|
|||
require 'pp'
|
||||
require 'delegate'
|
||||
require 'test/unit'
|
||||
require 'ruby2_keywords'
|
||||
|
||||
# Define bind_call for Ruby 2.6 and earlier
|
||||
class UnboundMethod
|
||||
unless public_method_defined?(:bind_call)
|
||||
def bind_call(obj, *args, &block)
|
||||
bind(obj).call(*args, &block)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module PPTestModule
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче