Bugs: Browse | Submit New | Admin
The behavior of require seems to have changed between Ruby versions 1.8.4 and 1.8.5. After upgrading ruby from 1.8.4 to 1.8.5, requiring "fox16" (a compiled extension module) causes a warning for each constant, and $" shows that "fox16.bundle" has been loaded more than once. We've confirmed that this also happens for the Linux build, and presumably it also happens on Windows.
Add A Comment:
Date: 2007-01-21 20:13 Sender: Laurent Julliard Has this been fixed in 1.8.5 patch 12?
Date: 2007-01-21 01:50 Sender: Jonathan Allen I can confirm that it occurs in Windows. I highly suggest you consider adding "Run FreeRIDE, look at conole output" and "Run fxri, look at conole output" to your pre-release test plan. I find it quite discouraging that something this obvious slipped through your procedures.
Date: 2006-11-02 06:36 Sender: Ryan Davis This is a bad design. simple.c file requires helper.rb which in turn requires simple.c. This is the cyclic require issue. If it has changed in 1.8.5 it has slipped by me. I'm going to assign to matz for verification.
Date: 2006-10-28 18:44 Sender: Ed Borasky Yes, I've seen it with the One-Click on Windows
Date: 2006-09-09 14:32 Sender: Lyle Johnson In order to reproduce the bug, dowload and unpack the attached tarball (simple.tar.gz). This contains three files: simple.c, helper.rb and the extconf.rb file. Run the extconf.rb script to create a Makefile for your operating system, then type "make" to build the extension. Once you've built the extension, start up "irb" and then type: require "simple". You should get a warning message, "already initialized constant FOO". If you inspect the value of $", you will see that the shared library part (simple.bundle, or simple.so, depending on your operating system) has been loaded twice.