Sha256: 8c134bf7bfdb7d3dfab5421996d9f7f61c920034ed91854978cc831303c5680d
Contents?: true
Size: 294 Bytes
Versions: 53
Compression:
Stored size: 294 Bytes
Contents
module Kernel def const_lookup(c) names = c.split '::' names.shift if names.first.empty? names.inject(Object) do |m, n| defined = RUBY_VERSION =~ /^1.9/ ? m.const_defined?(n, false) : m.const_defined?(n) defined ? m.const_get(n) : m.const_missing(n) end end end
Version data entries
53 entries across 53 versions & 3 rubygems