Open grncdr opened 6 years ago
This isn't a ruru issue unless you're specifically saying that ruru's docs are suggesting the use of Data.
As for using Data it is depricated. You can see the discussion on the Ruby Bug Tracker # 3072. That will also have the relevant information you're looking for on what you can use instead.
As per https://github.com/d-unseductable/ruru/blob/master/src/dsl.rs#L392, the documentation actually currently says that Data
must be used.
Thanks for pointing that out @asppsa . I haven't yet come across a need for using it so I'm not sure at the moment about implementing an alternative.
I tried switching everything over from Data
to Object
in ruru and that works (doc tests pass). That is what Ruby is officially doing:
Agreed. How about making Data alias to Object. It may be removed in the future (3.0?).
Matz.
The docs recommend inheriting from
Data
following this idiom:On Ruby 2.5, this prints
warning: constant ::Data is deprecated
every timeData
is accessed. I guess that there is some way to access this via the C extension API but I haven't found it yet.