Christoph email@example.com wrote in message
“Bennett, Patrick” Patrick.Bennett@inin.com wrote in message
This is what I’d “like” to do:
@varInternalOnly = 'test’
testObj = A.new
internalHelperMethod is an ``instance method’’ not a Class method
Maybe I’m missing something here, but… I called it from an instance.
You saw the ‘testObj = A.new’ - right? ;>
Anyway, as the short term fix you can
That works(!)… but why? (scratching head)
Why does send bypass access control?
Note that C++ static (class) method are quite different to Ruby’s class methods
I never expected them to be the same - I was just curious why a fairly ‘obvious’ (at least to me) situation like being
able to have a static method create instances of the classes it’s defined in and access private methods wasn’t supported in Ruby.