Sha256: fcf2ff256dba6db89e6a32015ce96edc1e7a59a2c138e596dbba60872f80dac6
Contents?: true
Size: 388 Bytes
Versions: 11
Compression:
Stored size: 388 Bytes
Contents
module Kernel if RUBY_VERSION < '1.9.0' # it would be defined if RUBY_VERSION < '1.9.0', see rdoc in ruby 1.9 def define_singleton_method msg, &block self.class.__send__ :define_method, msg, &block end end # it simply alias singleton(instance) method def alias_singleton_method new_msg, old_msg self.class.__send__ :alias_method, new_msg, old_msg end end
Version data entries
11 entries across 11 versions & 1 rubygems