concord icon indicating copy to clipboard operation
concord copied to clipboard

Ruby 2.4 - Concord::Public generates protected attr_reader methods?

Open tjchambers opened this issue 9 years ago • 2 comments

I have code:

    include Concord::Public.new(:cycle)

and am testing upgrade to Ruby 2.4.0.

Am receiving a new error:

 protected method `cycle' called for #<OE::ObservationRegenerator:0x007f98c4621ec0>

when I refer to .cycle from another class.

My inference is that I am mistaken and that Concord::Public does NOT create public attr_readers but rather protected attr_readers and that this is just now being detected in latest Ruby 2.4.

tjchambers avatar Mar 04 '17 18:03 tjchambers

In addition if I add a public

attr_reader :cycle

To same class, my code now works as before.

tjchambers avatar Mar 04 '17 18:03 tjchambers

@tjchambers I suspect that there is a behavior change for ruby 2.4. I do not consider 2.4 stable enough yet to switch my clients code to it, as soon this is the case I'll naturally port my ecosystem to it and fix this issue.

mbj avatar Mar 04 '17 19:03 mbj