On-the-fly Suggestions of Rewriting Method Deprecations
summary
A Ruby gem implements on-the-fly rewriting of deprecated method calls by intercepting calls, parsing the caller source with Prism, matching and transforming AST nodes via Symbat, and emitting either a log, a diff patch, or rewriting files directly. It targets local/test runs (not production), generates apply-able patches, handles simple renames and argument-to-keyword changes, and currently struggles with DSLs, performance on repeated calls, and non‑pure‑Ruby parsers.
AI-written summary · about
chapters (10)
- 0:00Introduction and motivation
- 3:18Deprecation problem overview
- 6:51Deprecation in other languages
- 11:20Designing DeprecWriteRuby
- 13:40Defining conversion rules
- 16:20Runtime code transformation
- 20:02Safety of runtime rewriting
- 23:22Usage modes and workflow
- 25:22Future prospects and challenges
- 27:42Conclusion and Q&A
related talks
32mPre-evaluation in Ruby
04mLightning Talk: Deprecatable
31mDeletion Driven Development: Code to delete code!
45mUsing Ruby to Generate Faster Ruby Code through Partial Evaluation
25mCrash course in transpiling Ruby
42mRuby 2 Methodology
29mSmalruby: Visualizing Ruby with Bidirectional Transpiration
26mSemi Automatic Code Review
