< Prev 1 ... 16 17 18 19 20 21 22 .. 1772 Next >
-
   1  require 'mkmf'
   2  
   3  dir_config("hpricot_scan")
   4  have_library("c", "main")
   5  
   6  create_makefile("hpricot_scan")
   7  
   8  if RUBY_VERSION >= '1.9.0'
   9    puts "Hackfixing all .c files to work on ruby 1.9"
  10  
  11    Dir['*.c'].each do |c|
  12      source = File.read(c).gsub(/RSTRING\((\w+)\)->(\w+)/){
  13        "RSTRING_#{$2.upcase}(#$1)"
  14      }
  15      File.open(c, 'w+'){|io| io.write(source) }
  16    end
  17  end