Skip to content

Instantly share code, notes, and snippets.

@jasonkarns
Created January 27, 2026 00:56
Show Gist options
  • Select an option

  • Save jasonkarns/17dffe9cb3da1648e19ab96c54b7d54f to your computer and use it in GitHub Desktop.

Select an option

Save jasonkarns/17dffe9cb3da1648e19ab96c54b7d54f to your computer and use it in GitHub Desktop.
Minimal repro: standardrb exe differs from rake task
gem "standard"
gem "stripe"
require "standard/rake"
# gem deps auto-required by Bundle.require thru Rails' config/application
require "stripe"
def repro
rescue Stripe::CardError, Stripe::StripeError
end
@jasonkarns
Copy link
Author

bundle exec standardrb runs clean (no errors detected)

rake standard fails with:

$ rake standard
standard: Use Ruby Standard Style (https://github.com/standardrb/standard)
  repro.rb:2:1: Lint/ShadowedException: Do not shadow rescued Exceptions.
rake aborted!

/opt/homebrew/lib/ruby/gems/4.0.0/gems/standard-1.53.0/lib/standard/rake.rb:18:in 'block in <top (required)>'
Tasks: TOP => standard
(See full trace by running task with --trace)

Same source code. Same version of standard. But the standard rake task finds violations that the executable does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment