Sha256: 88f3107fb87b0c290a8e360401691a80ab8b58844e9b77585fd83d8ca16c4c29
Contents?: true
Size: 406 Bytes
Versions: 16
Compression:
Stored size: 406 Bytes
Contents
module Kernel module_function def get_by_id( id ) ObjectSpace._id2ref( id ) end end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TCKernel < Test::Unit::TestCase def test_get_by_id a = "Test" i = a.object_id assert_equal( a, get_by_id(i) ) end end =end
Version data entries
16 entries across 16 versions & 1 rubygems