Sha256: 57058f1677942135891bbe368d948a813a66b5a40378cc8297d3c7eb4136b6da

Contents?: true

Size: 474 Bytes

Versions: 73

Compression:

Stored size: 474 Bytes

Contents

unless Kernel.method_defined? :public_send
  module Kernel
    def public_send(method, *args, &block)
      if respond_to?(method) && !protected_methods.include?(method.to_s)
        send(method, *args, &block)
      else
        :foo.generate_a_no_method_error_in_preparation_for_method_missing rescue nil
        # otherwise a NameError might be raised when we call method_missing ourselves
        method_missing(method.to_sym, *args, &block)
      end
    end
  end
end

Version data entries

73 entries across 73 versions & 5 rubygems

Version Path
backports-3.25.0 lib/backports/1.9.1/kernel/public_send.rb
backports-3.24.1 lib/backports/1.9.1/kernel/public_send.rb
backports-3.24.0 lib/backports/1.9.1/kernel/public_send.rb
backports-3.23.0 lib/backports/1.9.1/kernel/public_send.rb
backports-3.22.1 lib/backports/1.9.1/kernel/public_send.rb
backports-3.22.0 lib/backports/1.9.1/kernel/public_send.rb
backports-3.21.0 lib/backports/1.9.1/kernel/public_send.rb
backports-3.20.2 lib/backports/1.9.1/kernel/public_send.rb
backports-3.20.1 lib/backports/1.9.1/kernel/public_send.rb
backports-3.20.0 lib/backports/1.9.1/kernel/public_send.rb
backports-3.19.0 lib/backports/1.9.1/kernel/public_send.rb
backports-3.18.2 lib/backports/1.9.1/kernel/public_send.rb
backports-3.18.1 lib/backports/1.9.1/kernel/public_send.rb
backports-3.18.0 lib/backports/1.9.1/kernel/public_send.rb
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/backports-3.12.0/lib/backports/1.9.1/kernel/public_send.rb
backports-3.17.2 lib/backports/1.9.1/kernel/public_send.rb
backports-3.17.1 lib/backports/1.9.1/kernel/public_send.rb
backports-3.17.0 lib/backports/1.9.1/kernel/public_send.rb
backports-3.16.1 lib/backports/1.9.1/kernel/public_send.rb
backports-3.16.0 lib/backports/1.9.1/kernel/public_send.rb