The types of files that can have stuff dropped on them have keys in the registry to tell Windows how to run them. If you have your script's extension set up so that Ruby runs the script by default, then you're halfway there.
(Obligatory warning: this is a hack. Messing with your registry can royally screw up your computer. If you care at all about your data and don't trust me (as well you shouldn't), have a backup before you continue.)
- Start up the registry editor. It's called "regedit". (If you're running Vista or Windows 7, you may need to right-click it and "run as administrator".)
- Open up HKEY_CLASSES_ROOT\batfile\ShellEx\DropHandler. There will be a GUID as the default value. It happens to be the value used by batch files, EXE files, and a few others. As i'm not aware of any COM objects that Ruby uses, we're gonna abuse this one. It's labeled in the registry as ".exe drop target". What it seems to do is "start" the script, passing the files' names as args.
- Double-click the "(Default)" to open the value. Copy the guid, and then cancel out of the edit box.
- Now find "RubyFile" and "RubyWFile" inside HKEY_CLASSES_ROOT. The first one's for console scripts, and the latter seems to be for GUI scripts. If you use a different Ruby interpreter than i do, or if you set up the default handler yourself, you may find the keys "rbfile" and/or "rbwfile" instead.
- Right-click one of the keys, and create a new key in there called "ShellEx" if it doesn't already exist. Then create another key inside that new one, called "DropHandler".
- Edit the default value in that DropHandler key, and paste in the GUID you copied in step 3. Click OK.
- Repeat steps 5 and 6 with the other key.
Once that's done, you should be able to drag files onto your script.