Sha256: b7568b76eef8531c3407eab991377cb29471a32177ac146f49a1875528351920
Contents?: true
Size: 450 Bytes
Versions: 26
Compression:
Stored size: 450 Bytes
Contents
module Kernel private # Returns the method object of the current method. def this name = /\`([^\']+)\'/.match(caller(1).first)[1] return method(name) end end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TCKernel < Test::Unit::TestCase def test_this assert_equal( this, method(:test_this) ) end end =end
Version data entries
26 entries across 26 versions & 1 rubygems