Stupid Ruby Tricks
summary
Covers concrete Ruby tricks: use File.read/File.write instead of open/close, drop optional parentheses but avoid overloading lines, and create non‑shared defaults with a default_proc block to return fresh arrays or recursive hashes (you can swap the proc at runtime). Shows call‑chain control with prepend vs include and using defined?(super) guards, plus practical persistence with PStore (transactional file DB) and YAMLStore interchangeable APIs storing OpenStructs or custom objects.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:32Why stupid Ruby tricks
- 9:41File read/write shortcuts
- 11:50Optional parentheses
- 13:14Default hash quirks
- 19:18Include/prepend and super
- 23:16Real reason for talk
- 24:59Data and __END__
- 26:45PStore and YAMLStore
- 30:22Closing remarks








