I’ve been playing around with the IronRuby source for a couple of days
trying to figure out how to start an implementation of socket.
I’ve run into some roadblocks, and I’d appreciate any advice you guys
- Where should my source file(s) live? Initially I created a file
Socket.cs in IronRuby.Libraries/BuiltIns, but then I noticed that all
other files in that folder map directly to the “Built-in Classes and
Methods” chapter of the pickaxe book, whereas socket sits in the next
chapter - “Standard Library”. So I had a look in the
folder, and decided to move the file in there, but I’m still not 100%
that’s correct. Should there perhaps be a third folder here called
“StandardLibrary” or something?
- How do I get the ruby line “require ‘socket’” to work? I tried adding
module called “socket” (a static class Socket with attribute
[RubyModule(“socket”)] and regenerating Initializer.Generated.cs, but
try and do “require ‘socket’” from the interactive console, I get a
Ruby.Runtime.LoadError: “Could not load file or assembly ‘socket’”. This
leads me to believe that perhaps socket should be a separate dll, but I
think that must be wrong because you’d end up having a different dll for
every module in the standard library?
- Is “module” the correct ruby term for what the socket library is?
socket a ruby “module”?)
Thanks for your time