|
2 | 2 |
|
3 | 3 | ## 0.11.0 - 2024-02-10
|
4 | 4 |
|
| 5 | +### BREAKING CHANGES |
| 6 | + |
| 7 | +- Change InspectionTree so that it no longer `instance_eval`s the block it |
| 8 | + takes. ([#210](https://github.com/mcmire/super_diff/issues/210)) |
| 9 | + - If you have a custom InspectionTreeBuilder, you will need to change your |
| 10 | + `call` method so that instead of looking like this: |
| 11 | + ```ruby |
| 12 | + def call |
| 13 | + SuperDiff::ObjectInspection::InspectionTree.new do |
| 14 | + as_lines_when_rendering_to_lines(collection_bookend: :open) do |
| 15 | + add_text object.inspect |
| 16 | + end |
| 17 | + end |
| 18 | + end |
| 19 | + ``` |
| 20 | + it looks something like this instead: |
| 21 | + ```ruby |
| 22 | + def call |
| 23 | + SuperDiff::ObjectInspection::InspectionTree.new do |t1| |
| 24 | + t1.as_lines_when_rendering_to_lines(collection_bookend: :open) do |t2| |
| 25 | + t2.add_text object.inspect |
| 26 | + end |
| 27 | + end |
| 28 | + end |
| 29 | + ``` |
| 30 | + Note that the following methods yield a new InspectionTree, so the tree |
| 31 | + needs to be given a new name each time. It is conventional to use `t1`, |
| 32 | + `t2`, etc.: |
| 33 | + - `as_lines_when_rendering_to_lines` |
| 34 | + - `as_prefix_when_rendering_to_lines` |
| 35 | + - `as_prelude_when_rendering_to_lines` |
| 36 | + - `as_single_line` |
| 37 | + - `nested` |
| 38 | + - `only_when` |
| 39 | + - `when_empty` |
| 40 | + - `when_non_empty` |
| 41 | + - `when_rendering_to_lines` |
| 42 | + - `when_rendering_to_string` |
| 43 | + |
5 | 44 | ### Features
|
6 | 45 |
|
7 | 46 | - Add inspector for RSpec describable matchers not otherwise handled by an
|
|
25 | 64 |
|
26 | 65 | ### Improvements
|
27 | 66 |
|
28 |
| -- Change InspectionTree so that it no longer `instance_eval`s the block it |
29 |
| - takes. ([#210](https://github.com/mcmire/super_diff/issues/210)) |
30 | 67 | - Improve wording in `raise_error` failure messages.
|
31 | 68 | ([#218](https://github.com/mcmire/super_diff/issues/218))
|
32 | 69 |
|
|
0 commit comments