CplusRuby - Gluing C and Ruby

http://www.ntecs.de/blog/articles/2007/09/21/cplusruby-gluing-c-and-ruby

Thanks for the announce. I will keep an eye on your project when it
comes to speed with Rubyk. By the way, did anyone play with
RubyInline+Ruby2c like in the example below ?
require ‘inline’
class MyTest

def factorial(n)
f = 1
n.downto(2) { |x| f *= x }
f
end

inline(:Ruby) do |builder|
builder.optimize :factorial
end
end

Gaspard

Hi,

At Sun, 23 Sep 2007 06:50:05 +0900,
Joel VanderWerf wrote in [ruby-talk:270374]:

  • require “#{dir}/#{mod}”

which should work if there are no stray .rb files in the dir?

Actually, CONFIG[‘DLEXT’] is unnecessary at all and that code
works fine with “.so” on every platforms, since the extension
“.so” will be substituted with DLEXT internally.