Permalink
Browse files

Don't use #tap before Active Support is available, since older versio…

…ns of ruby don't have native implementations

[#2603 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
chrisk authored and jeremy committed May 4, 2009
1 parent 1c6fcbf commit d3ee8756c8b09b8524a9599926b02ededd27319c
Showing with 2 additions and 3 deletions.
  1. +2 −3 activerecord/lib/active_record.rb
@@ -21,9 +21,8 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++
-"#{File.dirname(__FILE__)}/../../activesupport/lib".tap do |path|
- $:.unshift(path) if File.directory?(path)
-end
+activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib"
+$:.unshift(activesupport_path) if File.directory?(activesupport_path)
require 'active_support'
require 'active_support/core/all'

0 comments on commit d3ee875

Please sign in to comment.