whitequark / ast

A library for working with Abstract Syntax Trees.
MIT License
195 stars 25 forks source link

Fixed AST::Node#updated to always return a copy. #25

Closed iliabylich closed 4 years ago

iliabylich commented 4 years ago

Currently it relies on a call chain #initialize -> #freeze that returns self. However, overriding constructor in a custom subclass and returning something else breaks updated.

Included a test case. Without my fix updated returns nil.

whitequark commented 4 years ago

Could you split code and CI changes in separate commits? Other than that LGTM

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 239014d77e0ce877132d7e1fe1bd203892991aa8 on iliabylich:fix-updated-method-for-subclasses into 05d232169ba36095bfb868157b01dd206b9c277b on whitequark:master.

iliabylich commented 4 years ago

@whitequark What is the versioning strategy here? Should the next version be 2.4.1?

whitequark commented 4 years ago

That's a bugfix AFAIU, so yes.