>>>>> "J" == Josh Stern <jstern / foshay.citilink.com> writes:

J> function written in current Ruby (though for this and other
J> reasons, it would be nice to extend Ruby to be able to get the syntax tree 
J> for a Proc),

 Just write an extension to do this


pigeon% cat b.rb
#!/usr/bin/ruby -riis
a = lambda do |x, y, *z|
   files = File.new("libcontents").read
   source.sub! /.rb/ ,""
   if files =~ Regexp.new(source + ".rb")
      system "tar -Ozxf rubylib.tar.gz #{source}.rb > /tmp/#{source}.rb"
      File.delete "/tmp/#{source}.rb"
   end
end
puts dump a
 
pigeon% 
pigeon% b.rb
lambda do |x, y, *z|
   files = File.new("libcontents").read
   source.sub!(/.rb/, "")
   if files =~ Regexp.new(source + ".rb")
      system("tar -Ozxf rubylib.tar.gz #{source}.rb > /tmp/#{source}.rb")
      File.delete("/tmp/#{source}.rb")
   end
end
pigeon% 


Guy Decoux