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