From: Roger Pack Date: 2009-08-13T20:18:12+09:00 Subject: [ruby-core:24908] Re: [Feature #1857] install *.h and *.inc > Here's my idea: at the time extconf.rb runs for linecache or ruby-debug-base, pull the Ruby sources from ftp.ruby-lang.org based on the current RUBY_VERSION and RUBY_PATCHLEVEL. Decompress, pull out *.h and *.inc, put it into a directory, and then proceed with the build. All of this in pure Ruby so I don't have to worry about wget or tar on Windows. That would work. There is a pure ruby zlib which might be useful. Of course, you need a working zlib installed to install any gem, anyway, so you could assume that's installed. My own personal perference would be, say you install gem "ruby_sources" to /lib/gems/1.8/gems/ruby_sources extract the sources and store them in /lib/gems/1.8/gems/ruby_sources/current_version then you could use them for another side purpose of mine: running "gem rdoc ruby_sources" would generate local rdocs for your core of ruby, but I suppose this isn't necessary for a first release. > If anyone can think of a better approach, please let me know. I don't want this to be something that I have to maintain with every Ruby release. The kicker is that not every patch number makes it there--what if they are running trunk, or an odd patch number--you might need to have sensible fallbacks in these cases. Though I suppose 99% of us will be using released patch numbers, and they'll probably stick around on the ftp site forever, so your original idea is probably sound :) -r