Created
October 24, 2010 12:11
-
-
Save Watson1978/643490 to your computer and use it in GitHub Desktop.
Need the implementation on intern.h with MacRuby.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# $ cd src/MacRuby/ | |
# $ ruby methods.rb include/ruby/intern.h | |
file = ARGV[0] | |
puts "Implementation is necessary." | |
File.open(file) {|f| | |
f.each_line do |line| | |
if(line =~ /^([^ \t\/\{\}#]+) ([^(;]+)/) | |
type = $1 | |
method = $2 | |
ary = method.split(" ") | |
if (ary.size > 1) | |
type = "#{type} #{ary[0]}" | |
method = ary[1] | |
end | |
unless(method =~ /{/) | |
method.gsub!(/\*/, "") | |
ret = `grep '#{method}' *` | |
puts method if(ret.length == 0) | |
end | |
end | |
end | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment