Saturday, August 21, 2010, 11:39:22 PM, you wrote:
RS> 1) Is there an active OCRA chat list?
RS> 2) When I use OCRA to create an executable, the executable crashes
before the first puts is executed.
RS> I tentatively have isolated the problem to subclassing String. …
RS> - - - -
RS> class PathnameString < String
RS> def initialize(arg)
RS> super arg
RS> def is_root_directory?
RS> !((self.convert_forward_slash_to_back_slash.strip =~
RS> def convert_forward_slash_to_back_slash
RS> self.class.new(self.gsub(///, “\”))
RS> - - - -
RS> Assuming that it is this subclassing that is causing OCRA
difficulties, do any of the gurus here know what I might have to do get
OCRA to understand the subclassing?
RS> In the alternate … I will have to change this from an ISA method
to a HASA method with a ton of delegates. Is there a good Ruby way to
RS> Does using a ghost method sound like a good idea here?
Replying to my own message:
Well, it was not subclassing, I think, that was messing OCRA up.
I had a handful of relatively innocuous *.rb files in a subdirectory off
of my main directory. These are some utility classes and modules. As
far as I can tell, there is nothing particularly special about them.
These functions sat in a directory named “Utils”. Changing the name of
the directory from Utils to UD_Stuff did not clear the crash.
The only thing that worked was moving these innocuous utility functions
from the subdirectory up a level to the same directory where main.rb
What’s weird is that I have other subdirectories (e.g. Models, Views,
Controllers) with large and complicated ruby files, and I have no
problems with them.
If anyone has any ideas … I’d love to hear them.