Skip to content

Instantly share code, notes, and snippets.

@Watson1978
Created October 24, 2010 12:11
Show Gist options
  • Save Watson1978/643490 to your computer and use it in GitHub Desktop.
Save Watson1978/643490 to your computer and use it in GitHub Desktop.
Need the implementation on intern.h with MacRuby.
# 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