C extension with Ruby extras; preferred naming?

I recently published the OneWire module, which wraps parts of
the Dallas/Maxim Onewire API (for their IButton hardware),
see <http://onewire.rubyforge.org/>.

The extension DLL/shared library is called "onewire", but I
also have some Ruby code that extends the same OneWire module.
I tried to name it "onewire.rb", which has "require onewire.so",
but the loader gets confused and only loads the DLL, not the
Ruby module (then the DLL),

What's the preferred way to handle this naming conflict? I'd
rather not rewrite the Ruby in C, and I'd prefer to avoid
renaming the DLL. Is there a third alternative?

Clifford Heath.

Clifford Heath wrote:

I recently published the OneWire module, which wraps parts of
the Dallas/Maxim Onewire API (for their IButton hardware),
see <http://onewire.rubyforge.org/&gt;\.

The extension DLL/shared library is called "onewire", but I
also have some Ruby code that extends the same OneWire module.
I tried to name it "onewire.rb", which has "require onewire.so",
but the loader gets confused and only loads the DLL, not the
Ruby module (then the DLL),

What's the preferred way to handle this naming conflict? I'd
rather not rewrite the Ruby in C, and I'd prefer to avoid
renaming the DLL. Is there a third alternative?

Clifford Heath.

Hmmm...RMagick does exactly what you describe: RMagick.rb loads RMagick.so. I'm not sure why RMagick would work and onewire wouldn't.

Hi,

At Mon, 22 Aug 2005 20:16:18 +0900,
Clifford Heath wrote in [ruby-talk:153215]:

The extension DLL/shared library is called "onewire", but I
also have some Ruby code that extends the same OneWire module.
I tried to name it "onewire.rb", which has "require onewire.so",
but the loader gets confused and only loads the DLL, not the
Ruby module (then the DLL),

Requiring with explicit ".so" suffix should load an extension
library even if ".rb" version is loaded already.

What does happen exactly at `require "onewire.so"', LoadError,
just false returns, or something else?

And where do you put them?

ยทยทยท

--
Nobu Nakada