# File lib/mspec/helpers/const_lookup.rb, line 2 2: def const_lookup(c) 3: names = c.split '::' 4: names.shift if names.first.empty? 5: names.inject(Object) do |m, n| 6: defined = RUBY_VERSION =~ /^1.9/ ? m.const_defined?(n, false) : m.const_defined?(n) 7: defined ? m.const_get(n) : m.const_missing(n) 8: end 9: end