summaryrefslogtreecommitdiffhomepage
path: root/tasks/mrbgem_spec.rake
diff options
context:
space:
mode:
authorMasaki Muranaka <[email protected]>2014-06-09 23:08:13 +0900
committerMasaki Muranaka <[email protected]>2014-06-09 23:08:13 +0900
commitc6d589e04900c0b90428d78931b7dfa3b4827b62 (patch)
tree9025a7369e8970ceed9710cbd956dc97b4962f90 /tasks/mrbgem_spec.rake
parente070fce835601ef9ff8d6fac8f7b16ff1a12cc54 (diff)
downloadmruby-c6d589e04900c0b90428d78931b7dfa3b4827b62.tar.gz
mruby-c6d589e04900c0b90428d78931b7dfa3b4827b62.zip
Do not export include/ dirs in mrbgems to core build.
In the current behavior, include/ dirs in mrbgems are set to core's compiler.include_paths. And they are never set to mrbgem's include_paths. It may cause some dangerous issues because it can change mruby core's macros by mrbgems. After this fix, include/ in a gem is used in the gem itself only.
Diffstat (limited to 'tasks/mrbgem_spec.rake')
-rw-r--r--tasks/mrbgem_spec.rake4
1 files changed, 1 insertions, 3 deletions
diff --git a/tasks/mrbgem_spec.rake b/tasks/mrbgem_spec.rake
index 0c4dc85c0..5e2f3fe22 100644
--- a/tasks/mrbgem_spec.rake
+++ b/tasks/mrbgem_spec.rake
@@ -49,9 +49,6 @@ module MRuby
def setup
MRuby::Gem.current = self
- @build.compilers.each do |compiler|
- compiler.include_paths << "#{dir}/include"
- end if File.directory? "#{dir}/include"
MRuby::Build::COMMANDS.each do |command|
instance_variable_set("@#{command}", @build.send(command).clone)
end
@@ -88,6 +85,7 @@ module MRuby
compilers.each do |compiler|
compiler.define_rules build_dir, "#{dir}"
compiler.defines << %Q[MRBGEM_#{funcname.upcase}_VERSION=#{version}]
+ compiler.include_paths << "#{dir}/include" if File.directory? "#{dir}/include"
end
define_gem_init_builder