rubocop / rubocop/ruby-style-guide

Is there a typo in the Suppressing Exceptions section?

Open
#887 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
16.5k
Forks
3.3k
PR merge metrics
No merged PRs in 30d

Description

At https://github.com/rubocop/ruby-style-guide#suppressing-exceptions, it says "Don't suppress" exceptions, but then lists do_something rescue nil as a good example.

# good
do_something rescue nil

It could be my ignorance, but that reads like an example of suppressing an exception. Am I misunderstanding? Apologies if so.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the Suppressing Exceptions section at the linked ruby-style-guide URL, focusing on the heading and the do_something rescue nil example. Confirm whether the wording and example are inconsistent, then clarify the section so its guidance and example agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.