From 0970ca957226d52af52e1f261fbb7ee8b3086cce Mon Sep 17 00:00:00 2001 From: Yuichiro MASUI Date: Sat, 23 Feb 2013 16:36:57 +0900 Subject: Support to build on pwd != mruby source root --- tasks/ruby_ext.rake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tasks/ruby_ext.rake') diff --git a/tasks/ruby_ext.rake b/tasks/ruby_ext.rake index 6817f6018..a0fbe7b72 100644 --- a/tasks/ruby_ext.rake +++ b/tasks/ruby_ext.rake @@ -12,6 +12,10 @@ class String def relative_path_from(dir) Pathname.new(File.expand_path(self)).relative_path_from(Pathname.new(File.expand_path(dir))).to_s end + + def relative_path + relative_path_from(Dir.pwd) + end # Compatible with 1.9 on 1.8 def %(params) -- cgit v1.2.3