concord
concord copied to clipboard
Ruby 2.4 - Concord::Public generates protected attr_reader methods?
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.
In addition if I add a public
attr_reader :cycle
To same class, my code now works as before.
@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.