Commit 2063bee7 authored by take_cheeze's avatar take_cheeze

Remove use of define_singleton_method.

parent 41dbcf7a
......@@ -30,10 +30,11 @@ MRuby::Toolchain.new(:gcc) do |conf|
end
[[conf.cc, 'c'], [conf.cxx, 'c++']].each do |cc, lang|
cc.define_singleton_method(:header_search_paths) do
cc.instance_variable_set :@header_search_language, lang
def cc.header_search_paths
if @header_search_command != command
result = `echo | #{build.filename command} -x#{lang} -Wp,-v - -fsyntax-only 2>&1`
result = `echo | #{command} -x#{lang} -Wp,-v - -fsyntax-only 2>&1` if $?.exitstatus != 0
result = `echo | #{build.filename command} -x#{@header_search_language} -Wp,-v - -fsyntax-only 2>&1`
result = `echo | #{command} -x#{@header_search_language} -Wp,-v - -fsyntax-only 2>&1` if $?.exitstatus != 0
return include_paths if $?.exitstatus != 0
@frameworks = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment