lib/multi_require.rb in multi_require-1.0.0 vs lib/multi_require.rb in multi_require-1.0.1
- old
+ new
@@ -6,10 +6,10 @@
Dir[pattern].sort.each { |f| require f if File.file? f }
true
end
def require_relative_pattern(pattern)
- source_path = File.dirname caller_locations[0].absolute_path
+ source_path = File.dirname caller.first.split(':').first
require_pattern File.join(source_path, pattern)
true
end
end
\ No newline at end of file