I played with Ruby on Rails for a while and decided to take a look at the actual source. Grabbed a repo from GitHub and started looking around. Found some code that I'm not sure what it is doing or what it is referencing.
I saw this code in actionmailer / test / abstract_unit.rb
root = File.expand_path('../../..', __FILE__) begin require "#{root}/vendor/gems/environment" rescue LoadError $:.unshift("#{root}/activesupport/lib") $:.unshift("#{root}/actionpack/lib") end lib = File.expand_path("#{File.dirname(__FILE__)}/../lib") $:.unshift(lib) unless $:.include?('lib') || $:.include?(lib) require 'rubygems' require 'test/unit' require 'action_mailer' require 'action_mailer/test_case'
Can someone tell me what refers to $: (aka "bling")?
ruby ruby-on-rails
Scott Radcliff Dec 13 '09 at 15:53 2009-12-13 15:53
source share