Skip to content

Commit cfe117c

Browse files
Change to implicit begin block
One chapter after the `Do not return from an ensure block`, is written that i should use `implicit begin blocks`. So why this isn't one?
1 parent 30b4074 commit cfe117c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2500,11 +2500,9 @@ condition](#safe-assignment-in-condition).
25002500

25012501
```Ruby
25022502
def foo
2503-
begin
2504-
fail
2505-
ensure
2506-
return 'very bad idea'
2507-
end
2503+
fail
2504+
ensure
2505+
return 'very bad idea'
25082506
end
25092507
```
25102508

0 commit comments

Comments
 (0)