summaryrefslogtreecommitdiffhomepage
path: root/tasks/ruby_ext.rake
diff options
context:
space:
mode:
authorYuichiro MASUI <[email protected]>2013-02-23 16:36:57 +0900
committerYuichiro MASUI <[email protected]>2013-02-23 19:03:59 +0900
commit0970ca957226d52af52e1f261fbb7ee8b3086cce (patch)
tree44d19fe10c6650d9010d25ab840ce6e7e2f860fb /tasks/ruby_ext.rake
parent58b9e7672474160df90ba11c915eeac093fe12d2 (diff)
downloadmruby-0970ca957226d52af52e1f261fbb7ee8b3086cce.tar.gz
mruby-0970ca957226d52af52e1f261fbb7ee8b3086cce.zip
Support to build on pwd != mruby source root
Diffstat (limited to 'tasks/ruby_ext.rake')
-rw-r--r--tasks/ruby_ext.rake4
1 files changed, 4 insertions, 0 deletions
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)