Permalink
Browse files

Make TODO note about import_relative. [admin]

  • Loading branch information...
1 parent ae70d03 commit 8983a1aaef28cab05fa3e5b33ed0f9abf719c91f @trans trans committed Jun 18, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/rc/core_ext.rb
View
@@ -3,14 +3,16 @@ module Kernel
# Evaluate script directly into current scope.
#
def import(feature)
- file = Find.load_path(feature).first
+ file = Find.feature(feature, :absolute=>true).first
raise LoadError, "no such file -- #{feature}" unless file
instance_eval(::File.read(file), file) if file
end
#
# Evaluate script directly into current scope.
#
+ # TODO: Shouldn't this be relative to calling file instead of Dir.pwd?
+ #
def import_relative(file)
raise LoadError, "no such file -- #{file}" unless File.file?(file)
instance_eval(::File.read(file), file) if file

0 comments on commit 8983a1a

Please sign in to comment.